edmiRemoteGetAttrDefinition

EdmiError edmiRemoteGetAttrDefinition(SdaiServerContext serverContextId,
                                        SdaiEntity        entityId, 
                                        SdaiString        attributeName, 
                                        SdaiAttr          *attributeId, 
                                        SdaiInvocationId  *edmiInvocationId); 

Returns a numeric attributeID that uniquely identifies an attribute definition instance in the remote EDMdatabase. The attribute is specified by the entityID that identify the entity definition instance in the EDMdatabase, and the attribute name. If the attribute name is not unique within the entity, it must be qualified by the name of the entity from which it is inherited. The returned attributeID will not change throughout the lifetime of its attribute definition instance in the EDMdatabase . It may be used to identify the attribute in subsequent EDMinterface  operations.

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiEntity

entityId

A numeric entityID that uniquely identifies the actual entity definition instance in the remote  EDMdatabase. This is the entity that defines the attribute._

SdaiString

attributeName

The name of the attribute for which to retrieve the attributeId.

SdaiAttr

attributeId

Variable that will receive the returned attribute Id.

SdaiInvocationId

edmiInvocationId

Currently not used.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

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 = edmiRemoteGetAttrDefinition(myContext, entityId,
 "NAME", &nameAttrId, NULL); 
 rstat = edmiRemoteGetAttrDefinition(myContext, entityId,
 "AGE", &ageAttrId, NULL); 
 rstat = edmiRemoteGetAttrDefinition(myContext, entityId,
 "WEIGHT", &weightAttrId, NULL); 
 rstat = edmiRemoteGetAttrDefinition(myContext, entityId,
 "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.

Â