edmiRemoteIsInstanceOfBN

EdmiError edmiRemoteIsInstanceOfBN(SdaiServerContext serverContextId,
                                     SdaiInstance      instanceId, 
                                     SdaiString        entityName, 
                                     SdaiBoolean       *isInstanceOf, 
                                     SdaiInvocationId  *edmiInvocationId); 
 

Determines whether an instance is an instance of exactly the specified instance type.

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiInstance

instanceId

A numeric instanceID that uniquely identifies the instance of interest in the remote database

SdaiString

entityName

The name of the entity. The entity must be defined by the underlying Express Schema of the edmModel that contains the instance given by the <instanceId> argument. Entity names are case insensitive.

SdaiBoolean

isInstanceOf

A variable that will receive TRUE if the instance given in argument <instanceId> is of the instance type given in the argument <entityId>. Otherwise, FALSE will be returned.

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


  

OptionComment
Option nameComment

 

Example


 

 EdmiError rstat;
 SdaiServerContext myContext;
 SdaiQueryResult qexRes;
 SdaiInstance *pInst;
 SdaiInteger index = 0, nHits = 10000;
 SdaiBoolean isRevolvingDoor;
  
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",
 "Johnny", "Supervisor", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Select all doors on first floor */
 rstat = edmiRemoteSelectInstances(myContext,
 "DataRepository", "GeneralHospital", 
 "DOOR", "FLOOR = 1", SUBTYPES | ONLY_INSTANCE_IDS,  
 NULL, NULL, NULL, &index, &nHits, &qexRes,  
 NULL, NULL, NULL, NULL); 
  
 /* All doors shall open outwards,
 unless already specified otherwise. 
 Leave revolving doors unchanged */ 
 pInst = qexRes->instanceIds;
 while (pInst) {
 rstat = edmiRemoteIsInstanceOfBN(myContext, 
 *pInst, "REVOLVING_DOOR",  
 &isRevolvingDoor, NULL); 
  
 if (! isRevolvingDoor) { 
 SdaiBoolean *_valSet; 
 SdaiString _attrName = "OPEN_DIRECTION"; 
 rstat = edmiRemoteTestAttrsBN(myContext, *pInst, 0, 1, 
 &_attrName, &_valSet, NULL); 
 if (! _valSet[0]) { 
 rstat = edmiRemotePutAttrsBN(myContext, *pInst, 1, NULL,  
 &_attrName, sdaiENUMERATION, "OPENDIR_OUTWARDS"); 
 } 
 } 
 }
 . . .

 

See also

Filter by label

There are no items with the selected labels at this time.