IBM Enterprise Records, Version 5.1.+            

Creating a RecordType object

To create a RecordType object, first specify all the required properties. You can obtain the property descriptions of all the required properties as shown in the code snippet given below:
//Returns the property descriptions that are required to create a RecordType object 
public PropertyDescriptions obtainRecordTypeProperties (RMObjectStore aoRMObjStr ) 
   throws PropertyNotFoundException 

{ 
   ClassDescriptions loClassDescriptions = 
      aoRMObjStr.getClassDescriptions( new int[]{RMType.RM_TYPE_RECORDTYPE}); 
   ClassDescription loClassDescription = (ClassDescription) loClassDescriptions.get(0); 
   PropertyDescriptions loPropertyDecriptions = 
      loClassDescription.getPropertyDescriptions(); 
   loPropertyDecriptions = 
      (PropertyDescriptions) loPropertyDecriptions.filterByProperty(Property.IS_VALUE_REQUIRED, 
      ReadableMetadataObjects.IS_EQUAL,true); 
   return loPropertyDecriptions; 

}
Then call the createRecordType method on an RMObjectStore object as shown in the following code snippet:
//Creates the RecordType object on the RMObjectStore interface
public void createRecordType(RMObjectStore aoRMOS, Properties aoRTProps,
   Permission aoRTACLs) 
{ 
   RecordType loRecordType = aoRMOS.createRecordType(aoRTProps,aoRTACLs); 

}


Feedback

Last updated: August 2011


© Copyright IBM Corporation 2011.
This information center is powered by Eclipse technology. (http://www.eclipse.org)