Read Item
[Category Manager API's]


Functions

alp_status_t alp_catmgr_dml_category_statement_begin (AlpDmlH dmlH, AlpLuid categoryLuid, AlpDmlStatementH *stmtH, int32_t *numResults)
alp_status_t alp_catmgr_dml_membership_statement_begin (AlpDmlH dmlH, AlpLuid entityLuid, AlpLuid categoryLuid, AlpDmlStatementH *stmtH, int32_t *numResults)
alp_status_t alp_catmgr_dml_statement_end (AlpDmlStatementH dmlStmtH)
alp_status_t alp_catmgr_dml_statement_get_int32 (AlpDmlStatementH dmlStmtH, AlpCatMgrDmlColumnType column, int32_t *value)
alp_status_t alp_catmgr_dml_statement_get_string (AlpDmlStatementH dmlStmtH, AlpCatMgrDmlColumnType column, char **value)
alp_status_t alp_catmgr_dml_statement_next (AlpDmlStatementH dmlStmtH)


Function Documentation

alp_status_t alp_catmgr_dml_category_statement_begin AlpDmlH  dmlH,
AlpLuid  categoryLuid,
AlpDmlStatementH stmtH,
int32_t *  numResults
 

Creates and initializes a new AlpDmlStatementH that can be used to iterate over a set of CategoryItem's in the CatMgr data model.

After calling this routine, you must call alp_catmgr_dml_statement_next() to advance the statement to the first object in the result set before you can call any of the alp_catmgr_dml_statement_get_* API to retrieve information from an object.

It is important to keep track of which alp_catmgr_dml_*_statement_init function you use to initialize which AlpDmlStatementH, because that will dictate which objects are included in the statement's result set, and what AlpCatMgrDmlColumnType's you can use to fetch values from items in the statement.

If there are no records found that match the search critereon, numResults, if it was supplied will be set to 0, ALP_STATUS_CATMGR_DML_NO_RECORDS will be returned, and the stmtH parameter will not be initialized (so the caller should not call alp_catmgr_dml_statement_next (or end) on it.

Parameters:
[in] dmlH Handle to the Contacts data model
[in] categoryLuid This optional parameter specifies a category Luid that could be used to retrieve information about a specific category. If 0, this parameter is ignored, and the stmtH result set will contain all categories.
[out] stmtH The address of a statement handle that is to be allocated and initialized by this routine.
[out] numResults Pointer to an integer that will be used to store the number of CategoryItem's found matching the filter parameters supplied. This parameter is optional, and if NULL, this value won't be computed or set.
Returns:
ALP_STATUS_CATMGR_DML_* error

alp_status_t alp_catmgr_dml_membership_statement_begin AlpDmlH  dmlH,
AlpLuid  entityLuid,
AlpLuid  categoryLuid,
AlpDmlStatementH stmtH,
int32_t *  numResults
 

Creates and initializes a new AlpDmlStatementH that can be used to iterate over a set of MembershipItem's in the CatMgr data model.

After calling this routine, you must call alp_catmgr_dml_statement_next() to advance the statement to the first object in the result set before you can call any of the alp_catmgr_dml_statement_get_* API to retrieve information from an object.

It is important to keep track of which alp_catmgr_dml_*_statement_init function you use to initialize which AlpDmlStatementH, because that will dictate which objects are included in the statement's result set, and what AlpCatMgrDmlColumnType's you can use to fetch values from items in the statement.

If there are no records found that match the search critereon, numResults, if it was supplied will be set to 0, ALP_STATUS_CATMGR_DML_NO_RECORDS will be returned, and the stmtH parameter will not be initialized (so the caller should not call alp_catmgr_dml_statement_next (or end) on it.

Parameters:
[in] dmlH Handle to the Contacts data model
[in] categoryLuid This optional parameter specifies a category Luid that could be used to retrieve information about a specific category. If 0, this parameter is ignored, and the stmtH result set will contain all categories.
[in] entityLuid This optional parameter specifies an entity Luid that could be used to retrieve membership information about a specific entity. If 0, this parameter is ignored, and the stmtH result set will contain memberships of all entities.
[out] stmtH The address of a statement handle that is to be allocated and initialized by this routine.
[out] numResults Pointer to an integer that will be used to store the number of MembershipItem's found matching the filter parameters supplied. This parameter is optional, and if NULL, this value won't be computed or set.
Returns:
ALP_STATUS_CATMGR_DML_* error

alp_status_t alp_catmgr_dml_statement_end AlpDmlStatementH  dmlStmtH  ) 
 

Disposes of the statement handle

Parameters:
[in,out] dmlStmtH Statement handle
Returns:
ALP_STATUS_CATMGR_DML_* error

alp_status_t alp_catmgr_dml_statement_get_int32 AlpDmlStatementH  dmlStmtH,
AlpCatMgrDmlColumnType  column,
int32_t *  value
 

Given a statement handle that has been initialized and stepped using alp_catmgr_dml_statement_next() where an item has been found, this function can be used to retrieve any integer field from the item located at the current statement position.

Parameters:
[in] dmlStmtH Handle to a statement
[in] column Any column type that exists for the item type pointed to in the statement.
[out] value Pointer to an integer to read out from a field of the current item in the statement
Returns:
ALP_STATUS_CATMGR_DML_* error

alp_status_t alp_catmgr_dml_statement_get_string AlpDmlStatementH  dmlStmtH,
AlpCatMgrDmlColumnType  column,
char **  value
 

Given a statement handle that has been initialized and stepped using alp_catmgr_dml_statement_next() where an item has been found, this function can be used to retrieve any string field from the item located at the current statement position.

Parameters:
[in] dmlStmtH Handle to a statement
[in] column Any column type that exists for the item type pointed to in the statement.
[out] value Pointer to a string to read out from a field of the current item in the statement. This is a copy and must be freed by the caller.
Returns:
ALP_STATUS_CATMGR_DML_* error

alp_status_t alp_catmgr_dml_statement_next AlpDmlStatementH  dmlStmtH  ) 
 

Given a statement handle initialized with an alp_catmgr_dml_*_statement_init() API, this routine will step the statement forward to point to the next item in the sequence. Note that you must call this API in order to get to the first element in the list.

Parameters:
[in] dmlStmtH Statement handle that has been initialized with an alp_catmgr_dml_*_statement_init() API
Returns:
ALP_STATUS_CATMGR_DML_* error


Generated on Wed Jul 30 07:06:41 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.