public class Value extends Object implements Cloneable, Serializable
Value
class represents the value information associated to a field.Modifier and Type | Method and Description |
---|---|
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.
|
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
valuepublic 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
valuepublic 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 int getIntValue()
public double getDoubleValue()
public String getCurrencyValue()
public String toString()
public boolean equals(Object obj)
public int hashCode()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public static int getARValueType(Object val)
? Copyright 2013 BMC Software, Inc.