Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : ABL API for Multi-tenant and Table Partition Management : Overview of the API : API entities and entity service methods
 
API entities and entity service methods
The IDataAdminstrationService interface provides service methods that implement create, read, update, and delete operations against single schema elements, or a collection of schema elements, accessed through supported entity and entity collection interfaces. The following tables list the available service methods for accessing the basic entities and entity collections with these operations. The listed entity name is the implementing class name for each entity object and is also part of each entity method name, for example, "Area" as in the NewArea( ) method. Corresponding entity collection methods have a similar method name using the plural of the entity name, for example in the NewAreas( ) method.
All method parameters are passed as INPUT and are indicated in the method syntax by data type only. Method return types are shown only for methods that return entity or entity collection objects. All other entity service methods return a LOGICAL of TRUE when execution returns successfully.
The API supports additional entities (for example partitions) that you can access as child entity or collection objects using properties and methods of the basic entity objects that you access through the service.
The following table provides a summary of factory and create methods on the IDataAdminstrationService interface for entities and entity collections that you can create through the service.
Table 24. Multi-tenant and Table Partition entity factory and create methods
Entity name
Factory (New) methods
Create methods
Area
IArea
  NewArea( CHARACTER )

IAreaSet
  NewAreas( )
CreateArea( IArea )

CreateAreas( IAreaSet )
AuthenticationSystem
IAuthenticationSystem
  NewAuthenticationSystem( CHARACTER )

IAuthenticationSystemSet
  NewAuthenticationSystems( )
CreateAuthenticationSystem(
  IAuthenticationSystem )

CreateAuthenticationSystems(
IAuthenticationSystemSet )
Domain
IDomain
  NewDomain( CHARACTER )

IDomainSet
  NewDomains( )
CreateDomain( IDomain )

CreateDomains( IDomainSet )
Extent
IExtent
  NewExtent( )
Sequence
ISequence
  NewSequence( CHARACTER )

ISequenceSet
  NewSequences( )
CreateSequence( ISequence )

CreateSequences( ISequenceSet )
Tenant
ITenant
  NewTenant( CHARACTER )

ITenantSet
  NewTenants( )
CreateTenant( ITenant )

CreateTenants( ITenantSet )
TenantGroup
ITenantGroup
  NewTenantGroup( CHARACTER )

ITenantGroupSet
  NewTenantGroups( )
CreateTenantGroup(
  ITenantGroup )

CreateTenantGroups(
  ITenantGroupSet )
User
IUser
  NewUser( CHARACTER )

IUserSet
  NewUsers( )
CreateUser( IUser )

CreateUsers( IUserSet )
PartitionPolicy
IPartitionPolicy
  NewPartitionPolicy( CHARACTER )

IPartitionPolicySet
  NewPartitionPolicies( )
CreatePartitionPolicy(
IPartitionPolicy )

CreatPartitionPolicies(
IPartitionPolicyCollection )
PartitionPolicyDetail
IPartitionPolicyDetail
  NewPartitionPolicyDetail( CHARACTER )
The factory (New*( )) methods return a new entity class instance (as the entity interface type) or an empty entity collection object (as the entity collection interface type), which you can update and pass to the corresponding Create*( ) methods to commit the changes to the database.
The entity factory methods take a character key as input and return a new entity object with the passed key assigned to the associated key property (typically Name or Id). All other properties are set to their default values. The NewExtent( ) method does not take any parameter and the service does not have a corresponding create method, because you add the extent object to an area object and committed it with the area object.
The collection factory methods have no parameter and return a new empty collection object. You can then add entity instances returned from the entity factory methods to the collection object and pass it to the corresponding Create*( ) method for the collection to commit all the entities to the database in a single transaction. For more information on transactions, see Managingtransactions.
For IPartitionPolicyDetail, a factory method that returns an empty collection does not exist, since the details collection always exists on the policy. Similarly, for IIndex, a factory method that returns an empty collection does not exist, since the a policy always consists an index.
The instances returned from the entity factory methods can also be added to existing collections retrieved with a Get*( ) method, then committed with the corresponding Update*( ) method in the service (see the following table). This is only necessary if the new instances need to be committed in the same transaction as other changes.
Similarly, the collections returned from the collection factory methods can also be added to existing collections retrieved with a Get*( ) method and then committed with the corresponding Update*( ) method in the service. This approach is only necessary if you need to ensure that instances imported from an external file are treated as new instances and gives an error if an instance with the same key already exists.
The following table provides a summary of read and update methods on the IDataAdminstrationService interface for entities and entity collections that you can read and update (if applicable) through the service.
Table 25. Multi-tenant and Table Partition entity read and update methods
Entity name
Read methods
Update methods
Administrator
IAdministrator
  GetAdministrator( )
UpdateAdministrator(
  IAdministrator )
Area
IArea
  GetArea( CHARACTER )

IAreaSet
  GetAreas( )
UpdateArea( IArea )
UpdateAreas( IAreaSet )
AuthenticationSystem
IAuthenticationSystem
  GetAuthenticationSystem(
    CHARACTER )

IAuthenticationSystemSet
  GetAuthenticationSystems( )
UpdateAuthenticationSystem(
  IAuthenticationSystem )

UpdateAuthenticationSystems(
  IAuthenticationSystemSet )
Domain
IDomain
  GetDomain( CHARACTER )

IDomainSet
  GetDomains( )
UpdateDomain( IDomain )

UpdateDomains( IDomainSet )
Schema1
ISchema
  GetSchema( )

ISchema
  GetSchemaChanges( CHARACTER )
UpdateSchema( ISchema )

UpdateSchemaChanges(
  ISchema )
Sequence
ISequence
  GetSequence( CHARACTER )

ISequenceSet
  GetSequences( )
UpdateSequence( ISequence )

UpdateSequences( ISequenceSet )
Table
ITable
  GetTable( CHARACTER )

ITableSet
  GetTables( )
UpdateTable( ITable )
UpdateTabless( ITableSet )
TablePermission
ITablePermission
  GetTablePermission( CHARACTER )

ITablePermissionSet
  GetTablePermissions( )
UpdateTablePermission(
  ITablePermission )

UpdateTablePermissions(
  ITablePermissionSet )
Tenant
ITenant
  GetTenant( CHARACTER )

ITenantSet
  GetTenants( )
UpdateTenant( ITenant )

UpdateTenants( ITenantSet )
TenantGroup
ITenantGroup
  GetTenantGroup( CHARACTER )

ITenantGroupSet
  GetTenantGroups( )
UpdateTenantGroup(
  ITenantGroup )

UpdateTenantGroups(
  ITenantGroupSet )
User
IUser
  GetUser( CHARACTER )

IUserSet
  GetUsers( )
UpdateUser( IUser )

UpdateUsers( IUserSet )
UserPermission
IUserPermission
  GetUserPermission( CHARACTER )

IUserPermissionSet
  GetUserPermissions( )
PartitionPolicy
IUserPermission
  Get PartitionPolicy ( CHARACTER )
  Get PartitionPolicy ( INTEGER )

IUserPermissionSet
  GetPartitionPolicies( )
Update PartitionPolicy ( IPartitionPolicy )

UpdatePartitionPolicies( IPartitionPolicySet )

1 The schema service methods represent a special case, because of their operation affects the entire database schema. For more information, see Schema(reading, loading, and updating).

The Get*( ) methods return a single entity instance or a collection with entities that you can update, then pass to a corresponding Update*( ) method to committed the changes to the database.
Most entity Get*( ) methods take a character key as input (which typically maps to the Name property value) and return an existing entity object. Some entity Get*( ) methods are overloaded to take an integer key (which typically maps to the Id property value) as an alternative to the character parameter shown in the above table.
For entity collection Get*( ) methods, the service also provides overloadings with an OpenEdge.DataAdmin.IRequestInfo parameter to provide filter information for the retrieved collection, as well as any child collections. For more information, see Filteringand sorting.
The following table provides a summary of delete methods on the IDataAdminstrationService interface for entities and entity collections that you can delete through the service.
Table 26. Multi-tenant and Table Partition entity delete methods
Entity name
Delete methods
AuthenticationSystem
DeleteAuthenticationSystem( CHARACTER )
Domain
DeleteDomain( CHARACTER )
Sequence
DeleteSequence( CHARACTER )
Tenant
DeleteTenant( CHARACTER )
TenantGroup
DeleteTenantGroup( CHARACTER )
User
DeleteUser( CHARACTER )
PartitionPolicy
DeletePartitionPolicy( CHARACTER )
The Delete*( ) methods take a single character key as input and delete the corresponding entity from the database without any warning or prompt. The methods throw an error if an entity with the specified key does not exist.
Note: You can also remove multiple entity objects from existing collections retrieved with an entity collection Get*( ) method, then commit the collections with the corresponding Update*( ) method. This approach allows you to make many deletions, along with other changes, to be committed in a single transaction. For more information on transactions, see Managingtransactions.