7.0 Action Request System Java API

com.remedy.arsys.api
Class Entry

java.lang.Object
  extended bycom.remedy.arsys.api.Entry
All Implemented Interfaces:
java.lang.Cloneable, IARPersistentObject, java.io.Serializable

public class Entry
extends java.lang.Object
implements IARPersistentObject, java.lang.Cloneable, java.io.Serializable

The Entry class is used to set and retrieve information about entries in a schema. An entry is a record in a schema. This class includes different operations you can perform on an entry, for example, merge or join (store).

See Also:
Serialized Form

Field Summary
static int AR_JOIN_SETOPTION_NONE
          Allows users to update fields used in the join criteria.
static int AR_JOIN_SETOPTION_REF
          Does not allow users to update fields used in the join criteria.
static int AR_MERGE_ENTRY_DUP_ERROR
          Generates an error if the Entry ID field and the ID specified already exists in the target form.
static int AR_MERGE_ENTRY_DUP_MERGE
          Updates the fields specified in the existing entry if the Entry ID field and the ID specified already exists in the target form.
static int AR_MERGE_ENTRY_DUP_NEW_ID
          Creates a new entry with a new ID if the Entry ID field and the ID specified already exists in the target form.
static int AR_MERGE_ENTRY_DUP_OVERWRITE
          Deletes the existing entry and create a new one in its place if the Entry ID field and the ID specified already exists in the target form.
static int AR_MERGE_NO_PATTERNS_INCREMENT
          Skips field pattern checking (including $MENU$) in the merge.
static int AR_MERGE_NO_REQUIRED_INCREMENT
          Allows NULL in required fields in the merge (not applicable for the Submitter, Status, or Short-Description core fields).
 
Method Summary
 void activate()
          AR System reserved method.
 void clear()
          Clears all of the references to member objects.
 java.lang.Object clone()
          Returns an object with data cloned from self.
 void create()
          Creates a new entry in the indicated schema on the specified server.
 void describe()
          Prints out EntryID
 ARServerUser getContext()
           
 EntryID getEntryID()
          Returns EntryID
 EntryItem[] getEntryItems()
          Returns the internal field-value information of this entry as EntryItem collection
 EntryKey getKey()
          Returns the EntryKey which identifies the schema, entry, and entry ID.
 NameID getSchemaID()
          Returns name of the associated schema NameID
 boolean isPresent()
          Denotes if the entry is valid.
 void load()
          Loads the entry object from AR System as specified by the entryKey data member.
 void merge(SchemaKey schemakey, int nMergeType)
          Merges an existing entry into the indicated form on the specified server.
 void passivate()
          AR System reserved method.
 void remove()
          Removes the schema entry with the indicated ID from the specified server.
 void setContext(ARServerUser ctxt)
          Associates ARServerUser information with this AR System server object.
 void setEntryID(EntryID entryID)
          Sets EntryID part of EntryKey data member
 void setEntryItems(EntryItem[] entryItems)
          Sets the field-value information as specified by EntryItem collection
 void setKey(EntryKey ek)
          Sets the EntryKey.
 void setSchemaID(NameID schemaID)
          Sets schema name as part of EntryKey data member
 void store()
          Updates an existing entry as specified by the entryKey data member
 void store(Timestamp getTime, int nOption)
          Updates an existing entry as specified by the entryKey data member
 void unsetContext()
          Removes the association to a specific user context.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AR_MERGE_ENTRY_DUP_ERROR

public static final int AR_MERGE_ENTRY_DUP_ERROR
Generates an error if the Entry ID field and the ID specified already exists in the target form.
Constants.AR_MERGE_ENTRY_DUP_ERROR

See Also:
Constant Field Values

AR_MERGE_ENTRY_DUP_NEW_ID

public static final int AR_MERGE_ENTRY_DUP_NEW_ID
Creates a new entry with a new ID if the Entry ID field and the ID specified already exists in the target form.
Constants.AR_MERGE_ENTRY_DUP_NEW_ID

See Also:
Constant Field Values

AR_MERGE_ENTRY_DUP_OVERWRITE

public static final int AR_MERGE_ENTRY_DUP_OVERWRITE
Deletes the existing entry and create a new one in its place if the Entry ID field and the ID specified already exists in the target form.
Constants.AR_MERGE_ENTRY_DUP_OVERWRITE

See Also:
Constant Field Values

AR_MERGE_ENTRY_DUP_MERGE

public static final int AR_MERGE_ENTRY_DUP_MERGE
Updates the fields specified in the existing entry if the Entry ID field and the ID specified already exists in the target form.
Constants.AR_MERGE_ENTRY_DUP_MERGE

See Also:
Constant Field Values

AR_MERGE_NO_REQUIRED_INCREMENT

public static final int AR_MERGE_NO_REQUIRED_INCREMENT
Allows NULL in required fields in the merge (not applicable for the Submitter, Status, or Short-Description core fields).
Constants.AR_MERGE_NO_REQUIRED_INCREMENT

See Also:
Constant Field Values

AR_MERGE_NO_PATTERNS_INCREMENT

public static final int AR_MERGE_NO_PATTERNS_INCREMENT
Skips field pattern checking (including $MENU$) in the merge.
Constants.AR_MERGE_NO_PATTERNS_INCREMENT

See Also:
Constant Field Values

AR_JOIN_SETOPTION_NONE

public static final int AR_JOIN_SETOPTION_NONE
Allows users to update fields used in the join criteria. Doesn't enforce join referential integrity.
Constants.AR_JOIN_SETOPTION_NONE

See Also:
Constant Field Values

AR_JOIN_SETOPTION_REF

public static final int AR_JOIN_SETOPTION_REF
Does not allow users to update fields used in the join criteria. Enforces join referential integrity.
Constants.AR_JOIN_SETOPTION_REF

See Also:
Constant Field Values
Method Detail

setKey

public void setKey(EntryKey ek)
Sets the EntryKey.


getKey

public EntryKey getKey()
Returns the EntryKey which identifies the schema, entry, and entry ID.


isPresent

public boolean isPresent()
Denotes if the entry is valid. This method is used when the EntryFactory.find object returns an EntryList, so that each entry in an entry list is either a valid entry or not.


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns an object with data cloned from self.

Throws:
java.lang.CloneNotSupportedException

create

public void create()
            throws ARException
Creates a new entry in the indicated schema on the specified server. You can create entries in either base schemas or join schemas.

Specified by:
create in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if entry is not created

remove

public void remove()
            throws ARException
Removes the schema entry with the indicated ID from the specified server. You can delete entries from base schemas only. To remove entries from join schemas, delete them from the underlying base schemas.

Specified by:
remove in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if entry is not removed

load

public void load()
          throws ARException
Loads the entry object from AR System as specified by the entryKey data member.

Specified by:
load in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if entry is not loaded

store

public void store()
           throws ARException
Updates an existing entry as specified by the entryKey data member

Specified by:
store in interface IARPersistentObject
Throws:
ARException - if object is not deleted

store

public void store(Timestamp getTime,
                  int nOption)
           throws ARException
Updates an existing entry as specified by the entryKey data member

Parameters:
getTime - Time stamp identifying when the entry was last retrieved. The system compares this value with the value in the Modified Date core field to determine whether the entry has been changed since the last retrieval. The system updates the entry if the value you specify is greater than Modified Date. If not, the system returns an error. You can either retrieve the entry again and determine whether to apply your changes or specify 0 for this parameter to bypass the time stamp comparison.
nOption - Value indicating whether users can update fields specified in the join qualification (applicable for join forms only).
  • AR_JOIN_SETOPTION_NONE = 0
    Users can update fields used in the join criteria (thereby causing the entry to no longer appear in the join form).
  • AR_JOIN_SETOPTION_REF = 1
    Users cannot update fields used in the join criteria.
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if entry is not updated

merge

public void merge(SchemaKey schemakey,
                  int nMergeType)
           throws ARException
Merges an existing entry into the indicated form on the specified server. You can merge entries into base forms only. To add entries to join forms, merge them into one of the underlying base forms. The system merges data based on the access privileges of the user you specify in ARServerUser object and the createMode setting for each field. User permissions are verified for each specified field. The system generates an error if the user does not have write permission for a field or a field does not exist.

Parameters:
nMergeType - A value indicating the action to take if the Entry ID already exists in the target form. This parameter is ignored if you do not specify the Entry ID or the ID specified does not conflict with existing entry IDs.

To omit some field validation steps, add the appropriate increments to the merge type.

Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if entry is not merged

setEntryItems

public void setEntryItems(EntryItem[] entryItems)
Sets the field-value information as specified by EntryItem collection


getEntryItems

public EntryItem[] getEntryItems()
Returns the internal field-value information of this entry as EntryItem collection


setSchemaID

public void setSchemaID(NameID schemaID)
Sets schema name as part of EntryKey data member


getSchemaID

public NameID getSchemaID()
Returns name of the associated schema NameID


getEntryID

public EntryID getEntryID()
Returns EntryID


setEntryID

public void setEntryID(EntryID entryID)
Sets EntryID part of EntryKey data member


describe

public void describe()
Prints out EntryID


activate

public void activate()
Description copied from interface: IARPersistentObject
AR System reserved method.

Specified by:
activate in interface IARPersistentObject

passivate

public void passivate()
Description copied from interface: IARPersistentObject
AR System reserved method.

Specified by:
passivate in interface IARPersistentObject

getContext

public ARServerUser getContext()

setContext

public void setContext(ARServerUser ctxt)
Description copied from interface: IARPersistentObject
Associates ARServerUser information with this AR System server object.

Specified by:
setContext in interface IARPersistentObject

unsetContext

public void unsetContext()
Description copied from interface: IARPersistentObject
Removes the association to a specific user context. This is equal to setContext(null).

Specified by:
unsetContext in interface IARPersistentObject

clear

public void clear()
Description copied from interface: IARPersistentObject
Clears all of the references to member objects.

Specified by:
clear in interface IARPersistentObject

7.0 Action Request System Java API