Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
Returns a numeric entityID that uniquely identifies an entity definition instance in the EDMdatabase. An entity name is unique within one dictionary model (Express schema). Hence the combination of <schemaId> and <entityName> identifies one particular entity definition in the EDMdatabase.
The actual dictionary model must be open before this function can be successfully performed.
If the specified <entityName> is the name of a legal complex entity that does not exist as an entity definition instance in the related dictionary model, an entity definition instance of the actual complex entity, will be created in the related dictionary model.
The returned entityID can be used to identify the actual entity in subsequent EDMinterface operations. The returned entityID will be a constant value throughout the lifetime of the actual entity definition instance in the EDMdatabase.
Related functions: edmiGetEntityInSchemaBN , edmiGetSchema , sdaiGetEntity
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetEntityInSchema(SdaiSchema  schemaId,
                                 SdaiString  entityName, 
                                 SdaiEntity  *entityId); 
Arguments:

schemaId

A numeric schemaID that uniquely identifies an Express schema in an EDMdatabase. The < schemaId> can be retrieved by the edmiGetSchema operation.

entityName

Specifies the name of the entity of interest. Entity names are case insensitive.

entityId

Address of the variable that will receive the numeric entityID that uniquely identifies the entity definition instance of interest in the EDMdatabase.

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
SdaiSchema schemaId;
SdaiEntity entityId;
. . .
if (rstat = edmiGetEntityInSchema(schemaId, "Document", &entityId)) {
/* Error in operation */ 
printf("\nError: %s in edmiGetEntityInSchema\n", 
edmiGetErrorText(rstat)); 
goto error; 
}
printf("\nentityId: %lu", entityId);
. . .

  • No labels