Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-03


oracle.jbo.rules
Class Variant

java.lang.Object
  extended by oracle.jbo.rules.Variant


public class Variant
extends java.lang.Object

Field Summary
static int ASSIGNED_NULL
           
static java.lang.String AssignedNull_S
          Type names
static int BIGDECIMAL
           
static java.lang.String BigDecimalType_S
           
static int BINARY_STREAM
          Deprecated. use INPUTSTREAM.
static java.lang.String BinaryStreamType_S
           
static int BOOLEAN
           
static java.lang.String BooleanType_S
           
static int BYTE
           
static int BYTE_ARRAY
           
static java.lang.String ByteArrayType_S
           
static java.lang.String ByteType_S
           
static int DATE
           
static java.lang.String DateType_S
           
static int DOUBLE
           
static java.lang.String DoubleType_S
           
static int FLOAT
           
static java.lang.String FloatType_S
           
static int INPUTSTREAM
           
static java.lang.String InputStreamType_S
           
static int INT
           
static java.lang.String IntType_S
           
static int LONG
           
static java.lang.String LongType_S
           
static int MaxTypes
           
static int NULL_TYPES
           
static Variant nullVariant
           
static int OBJECT
           
static java.lang.String ObjectType_S
           
static int SHORT
           
static java.lang.String ShortType_S
           
static int STRING
           
static java.lang.String StringType_S
           
static int TIME
           
static int TIMESTAMP
           
static java.lang.String TimestampType_S
           
static java.lang.String TimeType_S
           
static int UNASSIGNED_NULL
          Two types of null supported.
static java.lang.String UnassignedNull_S
           
static java.lang.String UnknownType_S
           

 

Constructor Summary
Variant()
           
Variant(int dataType)
          If this constructor is used, all set operations must be of dataType that the Variant was constructed with.

 

Method Summary
 int compareTo(Variant value2)
           
 boolean equals(Variant value)
           
 boolean equalsInstance(Variant value2)
           
 int getArrayLength()
           
 java.math.BigDecimal getAsBigDecimal()
           
 boolean getAsBoolean()
           
 double getAsDouble()
           
 float getAsFloat()
           
 int getAsInt()
           
 long getAsLong()
           
 short getAsShort()
           
 java.math.BigDecimal getBigDecimal()
           
 java.io.InputStream getBinaryStream()
          Deprecated. Use getInputStream().
 boolean getBoolean()
           
 byte getByte()
           
 byte[] getByteArray()
           
 java.sql.Date getDate()
           
 java.lang.Object getDisplayValue()
           
 double getDouble()
           
 float getFloat()
           
 java.io.InputStream getInputStream()
           
 int getInt()
           
 long getLong()
           
 java.lang.Object getObject()
           
 int getSetType()
           
 short getShort()
           
 java.lang.String getString()
           
 java.sql.Time getTime()
           
 java.sql.Timestamp getTimestamp()
           
static long getTimeZoneOffset()
          Returns the zime zone offset of the current calender.
 int getType()
           
 boolean isAssignedNull()
           
 boolean isNull()
           
 boolean isUnassignedNull()
           
 void setArrayLength(int length)
           
 void setAsDate(Variant value)
           
 void setAssignedNull()
           
 void setAsTime(Variant value)
           
 void setAsTimestamp(Variant value)
           
 void setAsVariant(Variant value)
           
 void setBigDecimal(java.math.BigDecimal val)
           
 void setBinaryStream(java.io.InputStream val)
          Deprecated. Use setInputStream().
 void setBoolean(boolean val)
           
 void setByte(byte val)
           
 void setByteArray(byte[] val, int length)
           
 void setDate(java.sql.Date val)
           
 void setDate(long val)
           
 void setDouble(double val)
           
 void setFloat(float val)
           
 void setInputStream(java.io.InputStream val)
           
 void setInt(int val)
           
 void setLong(long val)
           
 void setNull(int nullType)
           
 void setObject(java.lang.Object val)
           
 void setShort(short val)
           
 void setString(java.lang.String val)
           
 void setTime(long val)
           
 void setTime(java.sql.Time val)
           
 void setTimestamp(long val)
           
 void setTimestamp(long val, int nanos)
           
 void setTimestamp(java.sql.Timestamp val)
           
 void setUnassignedNull()
           
 void setVariant(Variant value)
           
 java.lang.String toString()
           
static int typeId(java.lang.String name)
           
static java.lang.String typeName(int type)
           
static int typeOf(java.lang.String typeName)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

UNASSIGNED_NULL

public static final int UNASSIGNED_NULL
Two types of null supported. Assigned is a null that was explicitly set to null. Unassigned is a null value because it was never assigned.
See Also:
Constant Field Values

ASSIGNED_NULL

public static final int ASSIGNED_NULL
See Also:
Constant Field Values

NULL_TYPES

public static final int NULL_TYPES
See Also:
Constant Field Values

BYTE

public static final int BYTE
See Also:
Constant Field Values

SHORT

public static final int SHORT
See Also:
Constant Field Values

INT

public static final int INT
See Also:
Constant Field Values

LONG

public static final int LONG
See Also:
Constant Field Values

FLOAT

public static final int FLOAT
See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
See Also:
Constant Field Values

BIGDECIMAL

public static final int BIGDECIMAL
See Also:
Constant Field Values

BOOLEAN

public static final int BOOLEAN
See Also:
Constant Field Values

BINARY_STREAM

public static final int BINARY_STREAM
Deprecated. use INPUTSTREAM.
See Also:
Constant Field Values

INPUTSTREAM

public static final int INPUTSTREAM
Since:
JB2.0 same as deprecated BINARY_STREAM.
See Also:
Constant Field Values

DATE

public static final int DATE
See Also:
Constant Field Values

TIME

public static final int TIME
See Also:
Constant Field Values

TIMESTAMP

public static final int TIMESTAMP
See Also:
Constant Field Values

STRING

public static final int STRING
See Also:
Constant Field Values

OBJECT

public static final int OBJECT
See Also:
Constant Field Values

BYTE_ARRAY

public static final int BYTE_ARRAY
See Also:
Constant Field Values

AssignedNull_S

public static final java.lang.String AssignedNull_S
Type names
See Also:
Constant Field Values

UnassignedNull_S

public static final java.lang.String UnassignedNull_S
See Also:
Constant Field Values

ByteType_S

public static final java.lang.String ByteType_S
See Also:
Constant Field Values

ShortType_S

public static final java.lang.String ShortType_S
See Also:
Constant Field Values

IntType_S

public static final java.lang.String IntType_S
See Also:
Constant Field Values

LongType_S

public static final java.lang.String LongType_S
See Also:
Constant Field Values

FloatType_S

public static final java.lang.String FloatType_S
See Also:
Constant Field Values

DoubleType_S

public static final java.lang.String DoubleType_S
See Also:
Constant Field Values

BigDecimalType_S

public static final java.lang.String BigDecimalType_S
See Also:
Constant Field Values

BooleanType_S

public static final java.lang.String BooleanType_S
See Also:
Constant Field Values

InputStreamType_S

public static final java.lang.String InputStreamType_S
See Also:
Constant Field Values

BinaryStreamType_S

public static final java.lang.String BinaryStreamType_S
See Also:
Constant Field Values

DateType_S

public static final java.lang.String DateType_S
See Also:
Constant Field Values

TimeType_S

public static final java.lang.String TimeType_S
See Also:
Constant Field Values

TimestampType_S

public static final java.lang.String TimestampType_S
See Also:
Constant Field Values

ByteArrayType_S

public static final java.lang.String ByteArrayType_S
See Also:
Constant Field Values

StringType_S

public static final java.lang.String StringType_S
See Also:
Constant Field Values

ObjectType_S

public static final java.lang.String ObjectType_S
See Also:
Constant Field Values

UnknownType_S

public static final java.lang.String UnknownType_S
See Also:
Constant Field Values

nullVariant

public static final Variant nullVariant

MaxTypes

public static final int MaxTypes
See Also:
Constant Field Values

Constructor Detail

Variant

public Variant(int dataType)
If this constructor is used, all set operations must be of dataType that the Variant was constructed with.

Variant

public Variant()

Method Detail

typeName

public static java.lang.String typeName(int type)

typeOf

public static int typeOf(java.lang.String typeName)

typeId

public static int typeId(java.lang.String name)

getTimeZoneOffset

public static long getTimeZoneOffset()
Returns the zime zone offset of the current calender. Used internally by JDeveloper.
Returns:
offset in milliseconds of current timezone.
Since:
JB2.0

getDisplayValue

public final java.lang.Object getDisplayValue()

getInt

public final int getInt()

getShort

public final short getShort()

getByte

public final byte getByte()

getLong

public final long getLong()

getBoolean

public final boolean getBoolean()

getDouble

public final double getDouble()

getFloat

public final float getFloat()

getString

public final java.lang.String getString()

getBigDecimal

public final java.math.BigDecimal getBigDecimal()

getDate

public final java.sql.Date getDate()

getTime

public final java.sql.Time getTime()

getTimestamp

public final java.sql.Timestamp getTimestamp()

getByteArray

public final byte[] getByteArray()

getArrayLength

public final int getArrayLength()

getBinaryStream

public final java.io.InputStream getBinaryStream()
Deprecated. Use getInputStream().

getInputStream

public final java.io.InputStream getInputStream()

setInt

public final void setInt(int val)

setShort

public final void setShort(short val)

setByte

public final void setByte(byte val)

setLong

public final void setLong(long val)

setBoolean

public final void setBoolean(boolean val)

setDouble

public final void setDouble(double val)

setFloat

public final void setFloat(float val)

setString

public final void setString(java.lang.String val)

setBigDecimal

public final void setBigDecimal(java.math.BigDecimal val)

setDate

public final void setDate(java.sql.Date val)

setTime

public final void setTime(java.sql.Time val)

setTimestamp

public final void setTimestamp(java.sql.Timestamp val)

setDate

public final void setDate(long val)

setTime

public final void setTime(long val)

setTimestamp

public final void setTimestamp(long val,
                               int nanos)

setTimestamp

public final void setTimestamp(long val)

setByteArray

public final void setByteArray(byte[] val,
                               int length)

setArrayLength

public final void setArrayLength(int length)

setBinaryStream

public final void setBinaryStream(java.io.InputStream val)
Deprecated. Use setInputStream().

setInputStream

public final void setInputStream(java.io.InputStream val)

setVariant

public final void setVariant(Variant value)

setAsVariant

public final void setAsVariant(Variant value)
Since:
2.01 Set this variant to value. If value is not the same setType, then an attempt is made to convert to the data type of this variant.

setObject

public final void setObject(java.lang.Object val)

getObject

public final java.lang.Object getObject()

getAsShort

public final short getAsShort()

getAsInt

public final int getAsInt()

getAsLong

public final long getAsLong()

getAsDouble

public final double getAsDouble()

getAsFloat

public final float getAsFloat()

getAsBigDecimal

public final java.math.BigDecimal getAsBigDecimal()

getAsBoolean

public final boolean getAsBoolean()

setAsTime

public final void setAsTime(Variant value)

setAsTimestamp

public final void setAsTimestamp(Variant value)

setAsDate

public final void setAsDate(Variant value)

setNull

public final void setNull(int nullType)

setAssignedNull

public final void setAssignedNull()

setUnassignedNull

public final void setUnassignedNull()

isAssignedNull

public final boolean isAssignedNull()

isUnassignedNull

public final boolean isUnassignedNull()

isNull

public final boolean isNull()

getType

public final int getType()

getSetType

public final int getSetType()

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

equalsInstance

public boolean equalsInstance(Variant value2)
Since:
JB2.0 Returns true if value or value instance changed. Note that will return false for Variants storing different Object reference values that may be equal. Provides high speed test that indicates two variants may not be equal. If true is returned they are equal. If false is returned, they might still be equal.

equals

public final boolean equals(Variant value)

compareTo

public int compareTo(Variant value2)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-03


Copyright © 1997, 2009, Oracle. All rights reserved.