7.0 Action Request System Java API

com.remedy.arsys.api
Class FieldFactory

java.lang.Object
  extended bycom.remedy.arsys.api.FieldFactory
All Implemented Interfaces:
IARObjectFactory

public class FieldFactory
extends java.lang.Object
implements IARObjectFactory

The methods in the FieldFactory class are used to instantiate a new field object or to get an existing field from the server. 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 a field object that is existing on the server:

FieldFactory fieldFactory = FieldFactory.getFactory( );
      NameID schemaName = new NameID( "Schema Name" );
      FieldID id = new FieldID( (long) 936970913 );
      FieldKey key = new FieldKey( schemaName, id );
      FieldCriteria criteria = new FieldCriteria( );
      criteria.setRetrieveAll( true );
      Field field = fieldFactory.findByKey( context, key, criteria );
 


Constructor Summary
protected FieldFactory()
           
 
Method Summary
static FieldKey[] find(ARServerUser context, FieldListCriteria criteria)
          Returns a list of field IDs specified by FieldListCriteria.
static Field findByKey(ARServerUser context, FieldKey key, FieldCriteria criteria)
          Returns detailed information about the Field object specified by FieldKey.
static Field[] findObjects(ARServerUser context, FieldListCriteria listcriteria, FieldCriteria criteria)
          Returns the information specified by FieldCriteria with a list of Field objects specified by FieldListCriteria.
static FieldFactory getFactory()
          Returns the FieldFactory factory.
 java.lang.Object newInstance()
          Returns a new Field object
 boolean releaseInstance(java.lang.Object obj)
          Releases instance of field object from memory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldFactory

protected FieldFactory()
Method Detail

getFactory

public static FieldFactory getFactory()
Returns the FieldFactory factory.


newInstance

public java.lang.Object newInstance()
Returns a new Field object

Specified by:
newInstance in interface IARObjectFactory

releaseInstance

public boolean releaseInstance(java.lang.Object obj)
Releases instance of field object from memory.

Specified by:
releaseInstance in interface IARObjectFactory

findByKey

public static Field findByKey(ARServerUser context,
                              FieldKey key,
                              FieldCriteria criteria)
                       throws ARException
Returns detailed information about the Field object specified by FieldKey. Use the following parameters:

Parameters:
context - An ARServerUser object containing user name, password, server name and language information
key - A FieldKey object containing a unique identifier for the field objects.
criteria - A FieldCriteria object containing the ID of the field to retrieve and the information to retrieve
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if information is not returned

find

public static FieldKey[] find(ARServerUser context,
                              FieldListCriteria criteria)
                       throws ARException
Returns a list of field IDs specified by FieldListCriteria. Use the following parameters:

Parameters:
context - An ARServerUser object containing user name, password, server name and language information
criteria - A FieldListCriteria object that defines the criteria for selecting the list of fields.
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if list is not returned

findObjects

public static Field[] findObjects(ARServerUser context,
                                  FieldListCriteria listcriteria,
                                  FieldCriteria criteria)
                           throws ARException
Returns the information specified by FieldCriteria with a list of Field objects specified by FieldListCriteria. Use the following parameters:

Parameters:
context - An ARServerUser object containing user name, password, server name and language information.
listcriteria - A FieldListCriteria object that defines the criteria for selecting the list of fields.
criteria - A FieldCriteria object that defines the information that should be retrieved.
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if information is not returned

7.0 Action Request System Java API