edmiRemoteGetEntity
EdmiError edmiRemoteGetEntity(SdaiServerContext serverContextId, SdaiModel model, SdaiString entityName, SdaiEntity *entityId, SdaiInvocationId *edmiInvocationId);
Returns a numeric entityID that uniquely identifies an entity definition instance in the remote EDMdatabase. An entity name is unique within the scope of a dictionary model (Dictionary models are compiled Express Schemas). The <model> parameter identifies the dictionary model through its underlying Express Schema. If the specified <entityName> is the name of a legal complex entity that is not explicitely defined in the dictionary model, An entity definition instance of the that specific complex entity, will be implicitely created within the dictionary model. The returned entityID can be used to identify the entity in subsequent EDMinterface operations. It will be a constant value for as long as the Express Schema remains defined in the remote EDMdatabase
Arguments
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
SdaiModel | model | A numeric modelID that uniquely identifies an edmModel of in the remote EDMdatabase. The underlying Express Schema of this model must be the one that defines the entity. |
SdaiString | entityName | The name of the entity for which to retrieve its Id. Entity names are case insensitive. |
SdaiEntity | entityId | A variable that will receive the numeric entityID that uniquely identifies the entity definition instance in the remote EDMdatabase |
SdaiInvocationId | edmiInvocationId | Currently not used. |
Return Value
Â
Options
 Â
Â
Example
Â
 EdmiError rstat; SdaiServerContext myContext; SdaiInstance instId; SdaiModel modelId; SdaiEntity entityId; SdaiAttr nameAttrId, ageAttrId; SdaiAttr weightAttrId, marriedAttrId; /* Create Server Context */ rstat = edmiDefineServerContext("MyContext", "Johnny", "Supervisor", "cf37ftr", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &myContext); /* Get the model Id */ rstat = edmiRemoteGetModelBN(myContext, "DataRepository", "MySocialNetwork", &modelId, NULL); /* Get the entity Id */ rstat = edmiRemoteGetEntity(myContext, modelId, "PERSON", &entityId, NULL); /* Get the attribute Ids */ rstat = edmiRemoteGetAttrDefinitionBN(myContext, "SocialNetwork", "Person", "NAME", &nameAttrId, NULL); rstat = edmiRemoteGetAttrDefinitionBN(myContext, "SocialNetwork", "Person", "AGE", &ageAttrId, NULL); rstat = edmiRemoteGetAttrDefinitionBN(myContext, "SocialNetwork", "Person", "WEIGHT", &weightAttrId, NULL); rstat = edmiRemoteGetAttrDefinitionBN(myContext, "SocialNetwork", "Person", "MARRIED", &marriedAttrId, NULL); /* Add lucy to my social network */ rstat = edmiRemoteCreateInstanceAndPutAttrs(myContext, modelId, entityId, 4, &instId, NULL, nameAttrId, sdaiSTRING, "Lucy Schmidt", ageAttrId, sdaiINTEGER, 32, weightAttrId, sdaiREAL, 59.5, marriedAttrId, sdaiBOOLEAN, sdaiFALSE); . . .
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â