IBM Enterprise Records, Version 5.1.+            

Retrieving a RecordInfos object

You can retrieve all the RecordInfos objects associated with a particular record type by calling the getAssociatedRecords method on a RecordType object, as shown in the following code snippet:
//Retrieves all the RecordInfos objects associated with a RecordType object 

public void workingWithAssociatedRecords(RecordType aoRecordType) 

{ 
   RecordInfos loRecordInfos = aoRecordType.getAssociatedRecords(); 
   Iterator loIterator = loRecordInfos.iterator(); 


   while(loIterator.hasNext()) 
   { 
      RecordInfo loRecordInfo = (RecordInfo) loIterator.next(); 
      System.out.println(" RecordInfo Name :"+loRecordInfo.getName()); 
   } 
}

If there is no object associated with the current instance of RecordType, the method returns an empty collection of RecordInfos.



Feedback

Last updated: August 2011


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