7.0 Action Request System Java API

com.remedy.arsys.api
Class Value

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

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

The Value class represents the value information associated to a field.

See Also:
Serialized Form

Constructor Summary
Value()
          Create a AR_DATA_TYPE_NULL value.
Value(AttachmentInfo v)
          Create a AR_DATA_TYPE_ATTACH value.
Value(java.math.BigDecimal bd)
          Create a AR_DATA_TYPE_DECIMAL value.
Value(ByteListInfo b)
          Create a AR_DATA_TYPE_BYTES value.
Value(CoordinateInfo[] v)
          Create a AR_DATA_TYPE_COORDS value
Value(CurrencyInfo c)
          Create a AR_DATA_TYPE_CURRENCY value.
Value(DataType d, long l)
          Create a AR_DATA_TYPE_ENUM value or AR_DATA_TYPE_BITMASK or AR_DATA_TYPE_ULONG.
Value(DateInfo d)
          Create a AR_DATA_TYPE_DATE value.
Value(Diary v)
          Create AR_DATA_TYPE_DIARY value
Value(double v)
          Create a AR_DATA_TYPE_REAL value.
Value(FieldID fldID)
          Helpful while constructing PropInfo with AR_DPROP_DISPLAY_PARENT as tag.
Value(int v)
          Create a AR_DATA_TYPE_INTEGER value.
Value(Keyword v)
          Create a AR_DATA_TYPE_KEYWORD value.
Value(long l)
          Create a AR_DATA_TYPE_ULONG value.
Value(java.lang.String v)
          Create a AR_DATA_TYPE_CHAR value.
Value(java.lang.String stringRepresentation, DataType valueType)
          Construct a value object from a string representation and DataType.
Value(Time v)
          Create a AR_DATA_TYPE_TIME_OF_DAY value.
Value(Timestamp v)
          Create a AR_DATA_TYPE_TIME value.
 
Method Summary
 java.lang.Object clone()
          Makes a copy of the object.
 void describe()
          Prints out value of the string.
 boolean equals(java.lang.Object anObject)
          Use this method for checking equality of Value.
 DataType getDataType()
          Returns the underlying object's datatype DataType.
 java.lang.Object getValue()
          Returns the underlying value as a generic object.
 java.lang.String toString()
          Returns in a String object all of the status messages.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Value

public Value()
Create a AR_DATA_TYPE_NULL value.


Value

public Value(java.lang.String stringRepresentation,
             DataType valueType)
Construct a value object from a string representation and DataType. Currently this function accepts the following data types:
INTEGER, REAL, CHAR, TIME (expecting Timestamp string which is the number of seconds since January 1, 1970), BITMASK, DECIMAL, ULONG, ENUM

Data types not supported:

KEYWORD, DIARY, BYTES, ATTACHMENT, JOIN, TRIM, CONTROL, TABLE, COLUMN, PAGE, PAGE_HOLDER, COORDS

To build a Value object holding data of the above types, use the default constructor and later call an appropriate Set method.

Throws:
java.lang.IllegalArgumentException - if you use an unsupported data type

Value

public Value(Keyword v)
Create a AR_DATA_TYPE_KEYWORD value.


Value

public Value(int v)
Create a AR_DATA_TYPE_INTEGER value.


Value

public Value(double v)
Create a AR_DATA_TYPE_REAL value.


Value

public Value(java.lang.String v)
Create a AR_DATA_TYPE_CHAR value.


Value

public Value(Diary v)
Create AR_DATA_TYPE_DIARY value


Value

public Value(long l)
Create a AR_DATA_TYPE_ULONG value.


Value

public Value(DataType d,
             long l)
      throws java.lang.IllegalArgumentException
Create a AR_DATA_TYPE_ENUM value or AR_DATA_TYPE_BITMASK or AR_DATA_TYPE_ULONG.


Value

public Value(ByteListInfo b)
Create a AR_DATA_TYPE_BYTES value.


Value

public Value(Timestamp v)
Create a AR_DATA_TYPE_TIME value.


Value

public Value(Time v)
Create a AR_DATA_TYPE_TIME_OF_DAY value.


Value

public Value(java.math.BigDecimal bd)
Create a AR_DATA_TYPE_DECIMAL value.


Value

public Value(CurrencyInfo c)
Create a AR_DATA_TYPE_CURRENCY value.


Value

public Value(DateInfo d)
Create a AR_DATA_TYPE_DATE value.


Value

public Value(AttachmentInfo v)
Create a AR_DATA_TYPE_ATTACH value.


Value

public Value(CoordinateInfo[] v)
Create a AR_DATA_TYPE_COORDS value


Value

public Value(FieldID fldID)
Helpful while constructing PropInfo with AR_DPROP_DISPLAY_PARENT as tag.

Method Detail

getValue

public java.lang.Object getValue()
Returns the underlying value as a generic object. For example, the following code snippet illustrates how to return a Long or Integer value:
 Object value = value.getValue();

 DataType type = value.getDataType();

 switch(type)
 {
    case DataType.ULONG:
       Long longValue = (Long) value;

    case DataType.INTEGER:
       Integer intValue = (Integer) value;
 


getDataType

public DataType getDataType()
Returns the underlying object's datatype DataType.


describe

public void describe()
Prints out value of the string.


toString

public java.lang.String toString()
Returns in a String object all of the status messages.


equals

public boolean equals(java.lang.Object anObject)
Use this method for checking equality of Value. The result is true only if the argument is not null and is a Value object that represents the same dataType and content. Currently this function support the compare of the following data types: KEYWORD, INTEGER, REAL, CHAR, DIARY, TIME, ENUM, ULONG, BITMASK, DECIMAL, COORDS.


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Makes a copy of the object.

Throws:
java.lang.CloneNotSupportedException

7.0 Action Request System Java API