com.remedy.arsys.api
Class EntryFactory

java.lang.Object
  |
  +--com.remedy.arsys.api.EntryFactory
All Implemented Interfaces:
IARObjectFactory

public class EntryFactory
extends java.lang.Object
implements IARObjectFactory

The methods in the EntryFactory class are used to instantiate a new entry object or to get the existing entry of a form. You then define the properties of the object, and then you can perform different operations (e.g. set/create/delete) on the object from the server side.

The following Java code snippet is an example of how to get the entry object of a form:

      //create a new entry factory object
      EntryFactory entryFactory = EntryFactory.getFactory( );
 
      //create an EntryKey with schemaID and EntryID 
      EntryKey entryKey = new EntryKey ( schemaID, entryID );
 
      //create an EntryListFieldInfo[] with the list of 
      //fields that are to be retrieved for this entry
      EntryListFieldInfo[]  entryFieldList = new EntryListFieldInfo[ ... ];
 
      //create a new entry criteria object        
      EntryCriteria criteria = new EntryCriteria( ); 
 
      //set the criteria information
      EntryCriteria.setEntryListFieldInfo[ entryFieldList ];
 
      //find the entry object
      Entry entry=entryFactory.findByKey( context, entryKey, entryCriteria );       
 


Constructor Summary
protected EntryFactory()
           
 
Method Summary
static EntryKey[] find(ARServerUser context, EntryListCriteria listCriteria, java.lang.Integer nMatches)
          Returns list of EntryKey objects that uniquely identify the result entry objects by executing the query as specified by EntryListCriteria.
static Entry findByKey(ARServerUser context, EntryKey entryKey, EntryCriteria entryCriteria)
          Returns the entry specified by EntryKey, ARServerUser, and EntryCriteria.
static EntryListInfo[] findEntryListInfos(ARServerUser context, EntryListCriteria listCriteria, EntryCriteria criteria, java.lang.Integer nMatches)
          Returns list of entry EntryListInfo information objects according to the criteria EntryListCriteria and EntryCriteria.
static Entry[] findObjects(ARServerUser context, EntryListCriteria listCriteria, EntryCriteria entryCriteria, java.lang.Integer nMatches)
          Returns list of entry Entry objects according to the criteria specified using EntryListCriteria and EntryCriteria.
static EntryFactory getFactory()
          Returns the entry factory.
 java.lang.Object newInstance()
          Instantiates a new entry object in memory.
 boolean releaseInstance(java.lang.Object obj)
          Releases instance of entry object from memory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryFactory

protected EntryFactory()
Method Detail

newInstance

public java.lang.Object newInstance()
Instantiates a new entry object in memory.
Specified by:
newInstance in interface IARObjectFactory

releaseInstance

public boolean releaseInstance(java.lang.Object obj)
Releases instance of entry object from memory.
Specified by:
releaseInstance in interface IARObjectFactory

getFactory

public static EntryFactory getFactory()
Returns the entry factory.

findByKey

public static Entry findByKey(ARServerUser context,
                              EntryKey entryKey,
                              EntryCriteria entryCriteria)
                       throws ARException
Returns the entry specified by EntryKey, ARServerUser, and EntryCriteria. To retrieve the entry with default set of fields, pass null as the value for the last parameter
Throws:
NullPointerException - if invalid ARServerUser object
ARException - if entry is not returned

find

public static EntryKey[] find(ARServerUser context,
                              EntryListCriteria listCriteria,
                              java.lang.Integer nMatches)
                       throws ARException
Returns list of EntryKey objects that uniquely identify the result entry objects by executing the query as specified by EntryListCriteria.
Parameters:
nMatches - will return the total number of (accessible) entries that match the qualification criteria. Specify null for this parameter if you do not want to retrieve this count.
Refs:
EntryFactory.findObjects
EntryFactory.findEntryListInfos
Throws:
NullPointerException - if invalid ARServerUser object
ARException - if list is not returned

findObjects

public static Entry[] findObjects(ARServerUser context,
                                  EntryListCriteria listCriteria,
                                  EntryCriteria entryCriteria,
                                  java.lang.Integer nMatches)
                           throws ARException
Returns list of entry Entry objects according to the criteria specified using EntryListCriteria and EntryCriteria.
Parameters:
nMatches - will return the total number of (accessible) entries that match the qualification criteria. Specify null for this parameter if you do not want to retrieve this count. This parameter is ignored when a list of entries to retrieve is specified in the EntryListCriteria.
Refs:
EntryFactory.find
EntryFactory.findEntryListInfos
Throws:
NullPointerException - if invalid ARServerUser object
ARException - if list is not returned

findEntryListInfos

public static EntryListInfo[] findEntryListInfos(ARServerUser context,
                                                 EntryListCriteria listCriteria,
                                                 EntryCriteria criteria,
                                                 java.lang.Integer nMatches)
                                          throws ARException
Returns list of entry EntryListInfo information objects according to the criteria EntryListCriteria and EntryCriteria.
Parameters:
nMatches - will return the total number of (accessible) entries that match the qualification criteria. Specify null for this parameter if you do not want to retrieve this count.
Throws:
NullPointerException - if invalid ARServerUser object
ARException - if list is not returned