|
AR System Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bmc.arsys.api.Value
public class Value
The Value
class represents the value information associated to a field.
Constructor Summary | |
---|---|
Value()
Create a AR_DATA_TYPE_NULL value. |
|
Value(AttachmentValue v)
Create a AR_DATA_TYPE_ATTACH value. |
|
Value(BigDecimal bd)
Create a AR_DATA_TYPE_DECIMAL value. |
|
Value(ByteListValue b)
Create a AR_DATA_TYPE_BYTES value. |
|
Value(CurrencyValue c)
Create a AR_DATA_TYPE_CURRENCY value. |
|
Value(DateInfo d)
Create a AR_DATA_TYPE_DATE value. |
|
Value(DiaryListValue v)
Create AR_DATA_TYPE_DIARY value |
|
Value(double v)
Create a AR_DATA_TYPE_REAL value. |
|
Value(int v)
Create a AR_DATA_TYPE_INTEGER value. |
|
Value(Keyword v)
Create a AR_DATA_TYPE_KEYWORD value. |
|
Value(List<CoordinateInfo> v)
Create a AR_DATA_TYPE_COORDS value |
|
Value(long l)
Create a AR_DATA_TYPE_ULONG value. |
|
Value(Object val,
DataType dt)
|
|
Value(String v)
Create a AR_DATA_TYPE_CHAR value. |
|
Value(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 | |
---|---|
Object |
clone()
Clone implementation that returns an Object with data cloned from self. |
static Object |
convertFromARValue(Object[] arValue,
boolean isStatusHistory,
boolean preserveEnumTypeInfo)
|
static Object |
ConvertToARValue(Object val)
|
boolean |
equals(Object obj)
Use this method for checking equality of Value. |
static int |
getARValueType(Object val)
|
String |
getCurrencyValue()
|
DataType |
getDataType()
Returns the underlying Object's datatype DataType . |
double |
getDoubleValue()
|
int |
getIntValue()
|
Object |
getValue()
Returns the underlying value as a generic Object. |
int |
hashCode()
Returns the hash code value for this instance of the current class. |
String |
toString()
Returns a string description of the object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Value()
AR_DATA_TYPE_NULL
value.
public Value(String stringRepresentation, DataType valueType)
DataType
.
Currently this function accepts the following data types:
INTEGER
, REAL
,
CHAR
,
TIME
(expecting Timestamp String which instanceof 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.
IllegalArgumentException
- if you use an unsupported data typepublic Value(Keyword v)
AR_DATA_TYPE_KEYWORD
value.
public Value(int v)
AR_DATA_TYPE_INTEGER
value.
public Value(double v)
AR_DATA_TYPE_REAL
value.
public Value(String v)
AR_DATA_TYPE_CHAR
value.
public Value(DiaryListValue v)
AR_DATA_TYPE_DIARY
value
public Value(long l)
AR_DATA_TYPE_ULONG
value.
public Value(ByteListValue b)
AR_DATA_TYPE_BYTES
value.
public Value(Timestamp v)
AR_DATA_TYPE_TIME
value.
public Value(Time v)
AR_DATA_TYPE_TIME_OF_DAY
value.
public Value(BigDecimal bd)
AR_DATA_TYPE_DECIMAL
value.
public Value(CurrencyValue c)
AR_DATA_TYPE_CURRENCY
value.
public Value(DateInfo d)
AR_DATA_TYPE_DATE
value.
public Value(AttachmentValue v)
AR_DATA_TYPE_ATTACH
value.
public Value(List<CoordinateInfo> v)
AR_DATA_TYPE_COORDS
value
public Value(Object val, DataType dt)
Method Detail |
---|
public Object getValue()
Object value = value.getValue(); DataType type = value.getDataType(); switch(type) { case DataType.ULONG: Long longValue = (Long) value; case DataType.INTEGER: Integer intValue = (Integer) value;
public DataType getDataType()
DataType
.
public int getIntValue()
public double getDoubleValue()
public String getCurrencyValue()
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
obj
- the object that we are comparing to
public int hashCode()
hashCode
in class Object
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public static Object ConvertToARValue(Object val)
public static int getARValueType(Object val)
public static Object convertFromARValue(Object[] arValue, boolean isStatusHistory, boolean preserveEnumTypeInfo)
|
AR System Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |