7.0 Action Request System Java API

com.remedy.arsys.api
Class EntryFactory

java.lang.Object
  extended bycom.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, boolean useLocale, 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 void findAndIterate(ARServerUser context, EntryListCriteria entryListCriteria, EntryCriteria entryCriteria, boolean useLocale, java.lang.Integer nMatches, int findMode, IARRowIterator iterator)
           
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, boolean useLocale, java.lang.Integer nMatches)
          Deprecated. This method is deprecated. findObjects should be used instead of this method.
static Entry[] findObjects(ARServerUser context, EntryListCriteria listCriteria, EntryCriteria entryCriteria, boolean useLocale, java.lang.Integer nMatches)
          Returns list of entry Entry objects according to the criteria specified using EntryListCriteria and EntryCriteria.
static int findObjectsByBlocks(ARServerUser context, EntryListCriteria entryListCriteria, EntryCriteria entryCriteria, int numEntriesPerBlock, boolean useLocale, java.lang.Integer numReturnedBlocks, java.lang.Integer numReturnedRows, java.lang.Integer numTotalMatches)
           
static void freeBlock(ARServerUser context, int handle)
           
static Entry[] getBlock(ARServerUser context, int handle, int blockNumber)
           
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:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if entry is not returned

find

public static EntryKey[] find(ARServerUser context,
                              EntryListCriteria listCriteria,
                              boolean useLocale,
                              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:
useLocale - will return only entries based on locale (1 or TRUE) or all enties (0 or FALSE). The Localize Server option must be selected to return only localized entries. For information about the Localize Server option, see the Configuring AR System guide.
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:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if list is not returned

findObjects

public static Entry[] findObjects(ARServerUser context,
                                  EntryListCriteria listCriteria,
                                  EntryCriteria entryCriteria,
                                  boolean useLocale,
                                  java.lang.Integer nMatches)
                           throws ARException
Returns list of entry Entry objects according to the criteria specified using EntryListCriteria and EntryCriteria.

Parameters:
entryCriteria - a list of fields to be retrieved with each entry. The system checks permissions for each specified fields and returns only those fields for which you have read access. If no fields are specified, then the returned field list defaults to "Results List Fields" that is defined in the schema.
useLocale - will return only entries based on locale (1 or TRUE) or all enties (0 or FALSE). The Localize Server option must be selected to return only localized entries. For information about the Localize Server option, see the Configuring AR System guide.
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:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if list is not returned

findObjectsByBlocks

public static int findObjectsByBlocks(ARServerUser context,
                                      EntryListCriteria entryListCriteria,
                                      EntryCriteria entryCriteria,
                                      int numEntriesPerBlock,
                                      boolean useLocale,
                                      java.lang.Integer numReturnedBlocks,
                                      java.lang.Integer numReturnedRows,
                                      java.lang.Integer numTotalMatches)
                               throws ARException
Throws:
ARException

getBlock

public static Entry[] getBlock(ARServerUser context,
                               int handle,
                               int blockNumber)
                        throws ARException
Throws:
ARException

freeBlock

public static void freeBlock(ARServerUser context,
                             int handle)
                      throws ARException
Throws:
ARException

findAndIterate

public static void findAndIterate(ARServerUser context,
                                  EntryListCriteria entryListCriteria,
                                  EntryCriteria entryCriteria,
                                  boolean useLocale,
                                  java.lang.Integer nMatches,
                                  int findMode,
                                  IARRowIterator iterator)
                           throws ARException
Throws:
ARException

findEntryListInfos

public static EntryListInfo[] findEntryListInfos(ARServerUser context,
                                                 EntryListCriteria listCriteria,
                                                 EntryCriteria criteria,
                                                 boolean useLocale,
                                                 java.lang.Integer nMatches)
                                          throws ARException
Deprecated. This method is deprecated. findObjects should be used instead of this method.

Returns list of entry EntryListInfo information objects according to the criteria EntryListCriteria and EntryCriteria.

Parameters:
useLocale - will return only entries based on locale (1 or TRUE) or all enties (0 or FALSE). The Localize Server option must be selected to return only localized entries. For information about the Localize Server option, see the Configuring AR System guide.
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:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if list is not returned

7.0 Action Request System Java API