edmiRemoteGetModelBN

EdmiError edmiRemoteGetModelBN(SdaiServerContext serverContextId,
                                 SdaiString        repositoryName,
                                 SdaiString        modelName,
                                 SdaiModel         *modelId,
                                 SdaiInvocationId  *edmiInvocationId);

Returns the numeric modelId that uniquely identifies the specified model in a remote EDMdatabase. The model is uniquely identified in the remote EDMdatabase  by its name and the repositoryId of the repository in which it is contained.

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiString

repository

he name of the repository that contains the model of interest in the remote  EDMdatabase

SdaiString

modelName

The name of the model for which to retrieve its modelId. Model names are case sensitive.

SdaiModel

modelId

A variable that will receive the numeric modelId that uniquely identifies the model.

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


 

 /*
 - -------------------------------------- 
 - File: c:/data/dental.exp 
 - -------------------------------------- 
 SCHEMA DentalStatus; 
  
 ENTITY Tooth; 
 Fillings : INTEGER; 
 END_ENTITY; 
  
 ENTITY Incisor SUBTYPE OF Tooth; END_ENTITY; 
 ENTITY Canin SUBTYPE OF Tooth; END_ENTITY; 
 ENTITY Molar SUBTYPE OF Tooth; END_ENTITY; 
 ENTITY Wisdom SUBTYPE OF Molar; END_ENTITY; 
  
 ENTITY Patient; 
 CustomerId : INTEGER; 
 ToothSet : ARRAY [1:32] OF OPTIONAL Tooth; 
 END_ENTITY; 
  
 END_SCHEMA; 
 */
 EdmiError rstat;
 SdaiServerContext myContext;
 SdaiModel modelId;
 SdaiInteger incisors[4] = {7,8,23,24};
 SdaiInteger nHits, index;
 SdaiInstance patientId;
 SdaiAggr toothSet;
  
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",
 "Johnny", "Dentist", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Get the modelId of the
 patient register model */ 
 rstat = edmiRemoteGetModelBN(myContext, "DataRepository",
 "PatientRegister", &modelId, NULL); 
  
 /* Get the instance Id of the patient
 with customerId 8745 */ 
 nHits = 1;
 index = 0;
 rstat = edmiRemoteFindInstancesBN(myContext, modelId,
 "Patient", "CustomerId = 8745", 
 sizeof(SdaiInstance), &index, &nHits, 
 &patientId, NULL); 
  
 /* Get the patients toothset */
 rstat = edmiRemoteGetAttrsBN(myContext, patientId, 0, 1, NULL,
 "ToothSet", sdaiAGGR, &toothSet); 
  
 /* The patient has lost all his
 four incisors in an accident */ 
 rstat = edmiRemoteUnsetAggrElements(myContext,
 toothSet, incisors, 4, NULL); 
 . . .

 

See also

Filter by label

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

Â