Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.server.util
Class Variant

    java.lang.Object
      |
      +--oracle.jbo.server.util.Variant

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

See Also:
  Serialized Form

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
`void` | `add(Variant value2, Variant result)`
`java.lang.Object` | `clone()`
`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()`
`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)`
`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)`
`void` | `subtract(Variant value2, Variant result)`
`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
`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.

### ASSIGNED_NULL

    public static final int ASSIGNED_NULL

### NULL_TYPES

    public static final int NULL_TYPES

### BYTE

    public static final int BYTE

### SHORT

    public static final int SHORT

### INT

    public static final int INT

### LONG

    public static final int LONG

### FLOAT

    public static final int FLOAT

### DOUBLE

    public static final int DOUBLE

### BIGDECIMAL

    public static final int BIGDECIMAL

### BOOLEAN

    public static final int BOOLEAN

### BINARY_STREAM

    public static final int BINARY_STREAM

  Deprecated. use INPUTSTREAM.

### INPUTSTREAM

    public static final int INPUTSTREAM

  Since:
    JB2.0 same as deprecated BINARY_STREAM.

### DATE

    public static final int DATE

### TIME

    public static final int TIME

### TIMESTAMP

    public static final int TIMESTAMP

### STRING

    public static final int STRING

### OBJECT

    public static final int OBJECT

### BYTE_ARRAY

    public static final int BYTE_ARRAY

### AssignedNull_S

    public static final java.lang.String AssignedNull_S

  Type names

### UnassignedNull_S

    public static final java.lang.String UnassignedNull_S

### ByteType_S

    public static final java.lang.String ByteType_S

### ShortType_S

    public static final java.lang.String ShortType_S

### IntType_S

    public static final java.lang.String IntType_S

### LongType_S

    public static final java.lang.String LongType_S

### FloatType_S

    public static final java.lang.String FloatType_S

### DoubleType_S

    public static final java.lang.String DoubleType_S

### BigDecimalType_S

    public static final java.lang.String BigDecimalType_S

### BooleanType_S

    public static final java.lang.String BooleanType_S

### InputStreamType_S

    public static final java.lang.String InputStreamType_S

### BinaryStreamType_S

    public static final java.lang.String BinaryStreamType_S

### DateType_S

    public static final java.lang.String DateType_S

### TimeType_S

    public static final java.lang.String TimeType_S

### TimestampType_S

    public static final java.lang.String TimestampType_S

### ByteArrayType_S

    public static final java.lang.String ByteArrayType_S

### StringType_S

    public static final java.lang.String StringType_S

### ObjectType_S

    public static final java.lang.String ObjectType_S

### UnknownType_S

    public static final java.lang.String UnknownType_S

### nullVariant

    public static final Variant nullVariant

### MaxTypes

    public static final int MaxTypes

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()

### 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)

### 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)

### add

    public void add(Variant value2,
                    Variant result)

### subtract

    public void subtract(Variant value2,
                         Variant result)

### clone

    public java.lang.Object clone()

  Overrides:
    clone in class java.lang.Object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD