edmiCreateInstanceContainer

EdmiError edmiCreateInstanceContainer(SdaiModel     modelId,
                                       SdaiOptions   options,
                                       SdaiString    name,
                                       SdaiString    description,
                                       SdaiContainer *containerId);

Creates an instance container within an edmModel.  Instance containers are used to group a selection of entity instances within the scope of an edmModel. In some connections, the instances contained within an instance container may be treated as one unit of data. Access control may be handled for all instances within the container by setting protection on the container it self. Containers may also be used for checking in and out all their contained instances by checking out the entire instance container. In general terms, an instance container is a data structure for organizing and administrating sets of entity instances of any number and types. There are four types of instance containers.

  1. Plain instance container
  2. Plain instance model container
  3. Lockable instance container
  4. Lockable instance model container.

None of the four instance container types may hold same instance more than once. An instance may not be held by more than one lockable container at the same time. An instance may be simultaneously held by any number of plain instance containers. The plain/lockable instance model containers are extended versions of the plain/lockable instance containers. The extension consists of the attribute POPULATED_FOLDERS. This attribute provides a higher level of internal organization of the entity instances within the instance container. The instances are arranged in entity extents in exactly the same way as the are for models. This provides a built in instance type sorting feature that will eliminate the need for writing type checking software code. Instance containers are represented by a numeric containerId or by a container name. A containerId is unique within the scope of an EDMdatabase. Container names are optional, but when set, they must be unique within the scope of an edmModel.


Arguments


TypeNameComment
SdaiModel

modelId

The id of the model in which the instance container shall be created.

SdaiOptions

options

Specifies the type of instance container to create. The options are mutually exclusive. See description of each option below. This parameter is mandatory

SdaiString

name

An optional name of the instance container. A container name must start with a letter. The rest of the name can be any sequence of alphanumeric characters and underscore. Container names are case sensitive.

SdaiString

description

An optional textual description of the purpose of the instance container.

SdaiContainer

containerId

Variable that will receive the containerId that uniquely identifies the created container within the EDMdatabase.

Return Value


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

 

Options


  

OptionComment

CONTAINER

Creates a plain instance container.

LOCK_CONTAINER

Creates a lockable instance container.

MODEL_CONTAINER

Creates a plain instance container with an extended representation of its contained instances.

MODEL_LOCK_CONTAINER

Creates a lockable container with an extended representation of its contained instances.

 

Example


 

 EdmiError rstat;
 SdaiModel modelId;
 SdaiContainer contId;
 . . .
 if (rstat = edmiCreateInstanceContainer( modelId, LOCK_CONTAINER,
 "FLOOR01", "Check out \ 
 of first floor",  
 &contId)) { 
 printf("\nError %d in edmiCreateInstanceContainer: %s", rstat, 
 edmiGetErrorText(rstat)); 
 goto err; 
 }
 . . .

 

See also

Filter by label

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

Â