edmiRemoteCreateInstanceContainer
EdmiError edmiRemoteCreateInstanceContainer(SdaiServerContext serverContextId, SdaiModel modelId, SdaiOptions options, SdaiString name, SdaiString description, SdaiContainer *containerId, SdaiInvocationId *edmiInvocationId);
Creates an instance container within an edmModel in a remote EDMdatabase. Instance containers are used to group a selection of application 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.
- Plain instance container
- Plain instance model container
- Lockable instance container
- 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 they 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
Type | Name | Comment |
serverContextId | Context identification, from edmiDefineServerContext | |
modelId | The id of the edmModel in which the instance container shall be created. | |
options | Specifies the type of instance container to create. The options are mutually exclusive. See description of each option below. This parameter is mandatory | |
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. | |
description | An optional textual description of the purpose of the instance container. | |
containerId | Variable that will receive the containerId that uniquely identifies the created container within the EDMdatabase. | |
edmiInvocationId | Currently not used |
Return Value
Options
Option | Comment |
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; SdaiServerContext myContext; . . . /* Define Remote Server Context */ rstat = edmiDefineServerContext("MyRemoteServerContext", "Johnny", "Supervisor", "cf37ftr", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &myContext); /* Create a lock container */ rstat = edmiRemoteCreateInstanceContainer(myContext, modelId, LOCK_CONTAINER "FLOOR01", "Check out of first floor", &contId, NULL); . . . /* Delete the container */ rstat = edmiRemoteDeleteInstanceContainer(myContext, contId, NULL); . . .
See also
Filter by label
There are no items with the selected labels at this time.