AR System Java API

com.bmc.arsys.api
Class Field

java.lang.Object
  extended by com.bmc.arsys.api.ObjectBase
      extended by com.bmc.arsys.api.Field
All Implemented Interfaces:
IARPersistentObject, Serializable, Cloneable
Direct Known Subclasses:
AttachmentField, AttachmentPoolField, CharacterField, ColumnField, ControlField, CurrencyField, DateOnlyField, DateTimeField, DecimalField, DiaryField, DisplayField, IntegerField, PageField, PageHolderField, RealField, SelectionField, TableField, TimeOnlyField, TrimField, ViewField

public abstract class Field
extends ObjectBase
implements Cloneable, Serializable

The Field class and methods are used to represent the properties of field objects.

See Also:
Serialized Form

Constructor Summary
Field()
           
Field(String form, int id)
           
 
Method Summary
 void clear()
          Clears all of the references to member objects.
 Object clone()
          Clone implementation that returns an Object with data cloned from self.
 boolean equals(Object obj)
          Use this method for checking equality between the current object and the provided one.
 List<PermissionInfo> getAssignedGroup()
          get list of assigned group
 int getAuditOption()
          Returns audit option for the field.
 int getCreateMode()
          Returns the flag indicating the permission status for the field when users submit entries.
 int getDataType()
          Returns the data type of the field.
 Value getDefaultValue()
          Returns the default Value of a data field.
 DisplayInstanceMap getDisplayInstance()
          Returns list of zero or more display properties to associate with the field.
 int getFieldID()
          Returns the internal ID of the field.
 FieldLimit getFieldLimit()
          Returns the value limits for the field and other properties specific to the field's type.
 FieldMapping getFieldMap()
          Returns underlying form in which to create the field (applicable for join forms only).
 int getFieldOption()
          Returns the flag indicating whether users must enter a value in the field.
 int getFieldType()
          Returns a bitmask indicating field types.
 String getForm()
          Returns the name of the form the field is linked to.
 FieldKey getKey()
          Returns unique identifier for field.
 ObjectPropertyMap getObjectProperty()
          Returns list of object properties.
 boolean getReservedIDOK()
          Returns the flag indicating whether you can create the field with a reserved ID.
 int getSetFieldOptions()
          Returns the flag indicating whether only display instances in the list will be replaced and rest left alone or if all of them will be replaced with new list.
 int hashCode()
          Returns the hash code value for this instance of the current class.
 boolean isCoreField()
          returns True if the field is a core field
static boolean isCoreFieldId(int fieldId)
          returns True if the id is a core field id
 boolean isGroupField()
           
static boolean isGroupField(int fieldId)
           
 boolean isGroupList()
           
static boolean isGroupList(int fieldId)
           
 boolean isMultiAssignField()
           
static boolean isMultiAssignField(int fieldId)
           
 boolean isRoleStateMappingField()
           
static boolean isRoleStateMappingField(int fieldId)
           
 boolean isRowLevelAccessField()
           
static boolean isRowLevelAccessField(int fieldId)
           
 boolean optionSet(int index)
          Reserved for internal use.
 void setAuditOption(int auditOption)
          Sets audit option 0 None 1 Audit 2 Copy 3 Audit and Copy
 void setCreateMode(int cm)
          Sets the flag indicating the permission status for the field when users submit entries.
 void setDefaultValue(Value v)
          Sets the value to apply if a user submits an entry with no field value (applicable for data fields only).
 void setDisplayInstance(DisplayInstanceMap displayInstance)
          Sets list of zero or more display properties to associate with the field.
 void setFieldID(int fid)
          Sets the internal ID of the field to create.
 void setFieldLimit(FieldLimit limit)
          Sets the value limits for the field and other properties specific to the field's type.
 void setFieldMap(FieldMapping mapInfo)
          Sets underlying form in which to create the field (applicable for join forms only).
 void setFieldOption(int opt)
          Sets the flag indicating whether users must enter a value in the field.
 boolean SetFieldOptionsSet()
          Reserved for internal use.
 void setForm(String form)
          Sets the name of the form the field is linked to.
 void setKey(FieldKey key)
          Sets unique identifier for field.
 void setObjectProperty(ObjectPropertyMap objPropList)
          Set list of object properties.
 void setPermissions(List<PermissionInfo> permissionList)
          Sets the permissions of the AR System object.
 void setReservedIDOK(boolean flag)
          Sets the flag indicating whether you can create the field with a reserved ID.
 void setSetFieldOptions(int opt)
          Sets the flag (following OR'd flags) into setFieldOptions to get the following behavior:
 String toString()
          Returns a string description of the object.
 
Methods inherited from class com.bmc.arsys.api.ObjectBase
appendDiaryText, getChangeFlags, getDiary, getHelpText, getLastChangedBy, getLastUpdateTime, getName, getNewName, getOwner, getPermissions, setChangeFlags, setDiary, setDiary, setHelpText, setLastChangedBy, setName, setNewName, setOwner
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Field

public Field()

Field

public Field(String form,
             int id)
Method Detail

setPermissions

public void setPermissions(List<PermissionInfo> permissionList)
Description copied from class: ObjectBase
Sets the permissions of the AR System object.

Specified by:
setPermissions in interface IARPersistentObject
Overrides:
setPermissions in class ObjectBase

getDataType

public int getDataType()
Returns the data type of the field.


getFieldType

public int getFieldType()
Returns a bitmask indicating field types. You can use any of the following Constants:


setFieldID

public void setFieldID(int fid)
Sets the internal ID of the field to create. The IDs of all fields and form views(VUIs) associated with a given form must be unique. Specify 0 for this parameter if you want the system to generate and return the ID. Otherwise, specify a value between 536870912 and 2147483647 (limited by AR_MAX_RESERVED_FIELD_ID). If you specify a reserved ID, the system generates an error unless the reservedIdOK parameter is set to 1 (TRUE) (see the Developing AR System Applications: Basic guide for restrictions on using reserved IDs).


getFieldID

public int getFieldID()
Returns the internal ID of the field.


setForm

public void setForm(String form)
Sets the name of the form the field is linked to. This field must be associated with a single form that currently exists on the server


getForm

public String getForm()
Returns the name of the form the field is linked to.


setFieldOption

public void setFieldOption(int opt)
Sets the flag indicating whether users must enter a value in the field.


getFieldOption

public int getFieldOption()
Returns the flag indicating whether users must enter a value in the field.


setSetFieldOptions

public void setSetFieldOptions(int opt)
Sets the flag (following OR'd flags) into setFieldOptions to get the following behavior:


getSetFieldOptions

public int getSetFieldOptions()
Returns the flag indicating whether only display instances in the list will be replaced and rest left alone or if all of them will be replaced with new list.


SetFieldOptionsSet

public boolean SetFieldOptionsSet()
Reserved for internal use.


optionSet

public boolean optionSet(int index)
Reserved for internal use.

Parameters:
index -

setReservedIDOK

public void setReservedIDOK(boolean flag)
Sets the flag indicating whether you can create the field with a reserved ID.

TRUE: Allow reserved IDs.
FALSE: System will generate an error when you specify a reserved ID for the fieldId parameter.


getReservedIDOK

public boolean getReservedIDOK()
Returns the flag indicating whether you can create the field with a reserved ID.

TRUE: Allow reserved IDs.
FALSE: System will generate an error when you specify a reserved ID for the fieldId parameter.


setCreateMode

public void setCreateMode(int cm)
Sets the flag indicating the permission status for the field when users submit entries.

This parameter is ignored for display-only fields.


getCreateMode

public int getCreateMode()
Returns the flag indicating the permission status for the field when users submit entries.

This parameter is ignored for display-only fields.


setAuditOption

public void setAuditOption(int auditOption)
Sets audit option 0 None 1 Audit 2 Copy 3 Audit and Copy


getAuditOption

public int getAuditOption()
Returns audit option for the field.


setDefaultValue

public void setDefaultValue(Value v)
Sets the value to apply if a user submits an entry with no field value (applicable for data fields only). The default value can be as many as 255 bytes in length and must be of the same data type as the field. Do not call this function for trim, control, page, and page holder fields or if you do not want to define a default value.


getDefaultValue

public Value getDefaultValue()
Returns the default Value of a data field. The system returns 0 if the field has no default


setFieldLimit

public void setFieldLimit(FieldLimit limit)
Sets the value limits for the field and other properties specific to the field's type. The type of the parameter to pass in is based on the field's type.


getFieldLimit

public FieldLimit getFieldLimit()
Returns the value limits for the field and other properties specific to the field's type. Cast the return value to the appropriate type.


getFieldMap

public FieldMapping getFieldMap()
Returns underlying form in which to create the field (applicable for join forms only).


setFieldMap

public void setFieldMap(FieldMapping mapInfo)
Sets underlying form in which to create the field (applicable for join forms only). If you are creating a field in a base form,specify a field type of 1 (AR_FIELD_REGULAR). Otherwise,specify a field type of 2 (AR_FIELD_JOIN), and identify the member form (primary or secondary) and field ID for the new field. If the member form is also a join form, create fields in all nested join forms until you can map the field to an underlying base form.


setDisplayInstance

public void setDisplayInstance(DisplayInstanceMap displayInstance)
Sets list of zero or more display properties to associate with the field. You can define both display properties common to all form views (VUIs)and display properties specific to particular views. The system includes the field in each view you specify, regardless of whether you define any display properties for those views. If you do not specify a property for a particular view, the system uses the default value (if defined). Specify NULL for this parameter if you do not want to define any display properties.


getDisplayInstance

public DisplayInstanceMap getDisplayInstance()
Returns list of zero or more display properties to associate with the field.


setObjectProperty

public void setObjectProperty(ObjectPropertyMap objPropList)
Set list of object properties.


getObjectProperty

public ObjectPropertyMap getObjectProperty()
Returns list of object properties.


clone

public Object clone()
             throws CloneNotSupportedException
Clone implementation that returns an Object with data cloned from self.

Overrides:
clone in class ObjectBase
Throws:
CloneNotSupportedException

getKey

public FieldKey getKey()
Returns unique identifier for field.


setKey

public void setKey(FieldKey key)
Sets unique identifier for field.


clear

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

Overrides:
clear in class ObjectBase

isCoreField

public boolean isCoreField()
returns True if the field is a core field


isCoreFieldId

public static boolean isCoreFieldId(int fieldId)
returns True if the id is a core field id


toString

public String toString()
Returns a string description of the object.

Overrides:
toString in class ObjectBase

hashCode

public int hashCode()
Returns the hash code value for this instance of the current class. This method is supported as required by the general contract of Object.hashCode, for the benefit of hash tables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class ObjectBase
Returns:
returns the hash code for this instance

equals

public boolean equals(Object obj)
Use this method for checking equality between the current object and the provided one. The result is true only if the argument is not null, is of the same type and represents the same content.

Overrides:
equals in class ObjectBase
Parameters:
obj - the object that we are comparing to
Returns:
returns a boolean that tells if the two objects equal

isGroupList

public static boolean isGroupList(int fieldId)

isRowLevelAccessField

public static boolean isRowLevelAccessField(int fieldId)

isRoleStateMappingField

public static boolean isRoleStateMappingField(int fieldId)

isMultiAssignField

public static boolean isMultiAssignField(int fieldId)

isGroupField

public static boolean isGroupField(int fieldId)

isGroupList

public boolean isGroupList()

isRowLevelAccessField

public boolean isRowLevelAccessField()

isRoleStateMappingField

public boolean isRoleStateMappingField()

isMultiAssignField

public boolean isMultiAssignField()

isGroupField

public boolean isGroupField()

getAssignedGroup

public List<PermissionInfo> getAssignedGroup()
get list of assigned group

Returns:
list of assigned group

AR System Java API

© Copyright 2006, 2007 BMC Software, Inc.