edmiRemoteGetDefinedType

EdmiError edmiRemoteGetDefinedType(SdaiServerContext serverContextId,
                                     SdaiModel         modelId,
                                     SdaiString        typeName,
                                     SdaiType          *typeId,
                                     SdaiInvocationId  *edmiInvocationId);

Returns a numeric typeID that uniquely identifies a defined type instance in the remote EDMdatabase. The defined type is specified by its name and a modelID that uniquely identifies a data model in the EDMdatabase. The underlying Express Schema of the edmModel, identified by the modelId, must be the one that defines the type. The returned typeID may be used to identify the defined type in subsequent remote EDMinterface operations. It will be a constant value for as long as the Express Schema remains defined in the remote EDMdatabase. If a type with the specified name is not defined in the underlying Express Schema of the edmModel, then this operation will search for it in the EDMmetaMetaModel named SDAI_DICTIONARY_MODEL_DICTIONARY_DATA.

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiModel

modelId

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 defined type.

SdaiString       

typeName

The name of the defined type of interest. A defined type name is unique within the scope of an Express Schema. Names of defined types are case insensitive.

SdaiType         

typeId

A variable that will receive the typeId that uniquely identifies a defined type in the remote EDMdatabase.

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


 

 /*
 SCHEMA Accounts 
 TYPE tUSD = REAL; END_TYPE; 
 TYPE tEUR = REAL; END_TYPE; 
 TYPE tNOK = REAL; END_TYPE; 
 TYPE tAmount = SELECT (tUSD, tEUR, tNOK); END_TYPE; 
  
 ENTITY Turnover; 
 Year 
 Sales : ARRAY [1:12] OF tAmount; 
 END_ENTITY; 
 END_SCHEMA; 
 */
 EdmiError rstat;
 SdaiServerContext myContext;
 SdaiAggr aggrId;
 SdaiType tAmountId;
 SdaiInstance instId;
 tSdaiSelect sel;
 SdaiSelect salesAmount = &sel;
 SdaiModel modelId;
  
 /* Create Server Context */
 rstat = edmiDefineServerContext("MyContext",
 "Johnny", "Supervisor", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Create instance of sales */
 rstat = edmiRemoteCreateInstanceAndPutAttrsBN(myContext,
 "AdminRepository", "Economy", 
 "Turnover", 0, &instId, NULL); 
  
 /* Create the Id of the Economy model */
 rstat = edmiRemoteGetModelBN(myContext, "AdminRepository",
 "Economy", &modelId, NULL); 
  
 /* Get the type Id of tAmount */
 rstat =edmiRemoteGetDefinedType(myContext, modelId,
 "tAmount", &tAmountId, NULL); 
  
 /* Create typed aggregate */
 salesAmount->nTypes = 1;
 salesAmount->type = sdaiREAL;
 salesAmount->typeList = &tAmountId;
 salesAmount->value.realVal = 0;
 rstat = edmiRemoteCreateTypedAggrBN(myContext,
 instId, "Sales", salesAmount,  
 &aggrId, NULL); 
 . . .

 

See also

Filter by label

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

Â