Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 6.0sp2 API Reference

## weblogic.db.jdbc
Class Value

    java.lang.Object
      |
      +--weblogic.db.jdbc.Value

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

Value objects correspond to the attributes of a Record object. A Record with N attributes has N Value objects, each accessible by name or index.

A Value object has an internal type that is defined by the Schema of the parent DataSet. A Value object can be assigned a value with a data type other than its internal type if the assignment is legal. Correspondingly, a Value object can return a value of a data type other than its internal data type if the request is legal. Value types are mapped to the JDBC types given in java.sql.Types.

For implementation and usage see the Developers Guide

Author:
  Copyright (c) 1995-1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-1999 by BEA Systems, Inc. All Rights Reserved.
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `Record`, Serialized Form

Constructor Summary
`Value(java.sql.ResultSet rs, int colnum, int type)`

Method Summary
`java.math.BigDecimal` | `asBigDecimal()` Returns the BigDecimal value of a Value object.
`java.math.BigDecimal` | `asBigDecimal(int scale)` Returns the BigDecimal value of a Value object.
`boolean` | `asBoolean()` Returns the boolean value of a Value object.
`byte` | `asByte()` Returns the byte value of a Value object.
`byte[]` | `asBytes()` Returns the byte[] value of a Value object.
`java.sql.Date` | `asDate()` Returns the java.sql.Date value of a Value object.
`double` | `asDouble()` Returns the double value of a Value object.
`float` | `asFloat()` Returns the float value of a Value object.
`int` | `asInt()` Returns the integer value of a Value object.
`long` | `asLong()` Returns the long value of a Value object.
`short` | `asShort()` Returns the short value of a Value object.
`java.lang.String` | `asString()` Returns the String value of a Value object.
`java.sql.Time` | `asTime()` Returns the java.sql.Time value of a Value object.
`java.sql.Timestamp` | `asTimestamp()` Returns the java.sql.Timestamp value of a Value object.
`java.util.Date` | `asUtilDate()` Returns the java.util.Date value of a Value object.
`boolean` | `isBigDecimal()` Determines whether the data of this Value object is of type BigDecimal.
`boolean` | `isBytes()` Determines whether the data of this Value object is of type byte[].
`boolean` | `isDate()` Determines whether the data of this Value object is of type java.sql.Date.
`boolean` | `isDouble()` Determines whether the data of this Value object is of type double.
`boolean` | `isFloat()` Determines whether the data of this Value object is of type float.
`boolean` | `isInt()` Determines whether the data of this Value object is of type integer.
`boolean` | `isLong()` Determines whether the data of this Value object is of type integer.
`boolean` | `isNull()` Determines whether the data of this Value object is NULL.
`boolean` | `isString()` Determines whether the data of this Value object is of type String.
`boolean` | `isTime()` Determines whether the data of this Value object is of type java.sql.Time.
`boolean` | `isTimestamp()` Determines whether the data of this Value object is of type java.sql.Timestamp.
`boolean` | `isUtilDate()` Determines whether the data of this Value object is of type java.util.Date.
`java.lang.String` | `toString()` Returns a String representation of a Value object.
`int` | `type()`

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

Constructor Detail

### Value

    public Value(java.sql.ResultSet rs,
                 int colnum,
                 int type)
          throws java.sql.SQLException,
                 DataSetException

Method Detail

### type

    public int type()

### toString

    public java.lang.String toString()

  Returns a String representation of a Value object.

  Returns:
    String object
  Overrides:
    toString in class java.lang.Object

### asString

    public java.lang.String asString()

  Returns the String value of a Value object.

  Returns:
    String object

### asBigDecimal

    public java.math.BigDecimal asBigDecimal()

  Returns the BigDecimal value of a Value object.

  Returns:
    BigDecimal object

### asBoolean

    public boolean asBoolean()
                      throws DataSetException

  Returns the boolean value of a Value object.

  Returns:
    Boolean value
  Throws:
    DataSetException - if there is an error getting the data

### asByte

    public byte asByte()
                throws DataSetException

  Returns the byte value of a Value object.

  Returns:
    Byte value
  Throws:
    DataSetException - if there is an error getting the data

### asShort

    public short asShort()
                  throws DataSetException

  Returns the short value of a Value object.

  Returns:
    Short value
  Throws:
    DataSetException - if there is an error getting the data

### asInt

    public int asInt()
              throws DataSetException

  Returns the integer value of a Value object.

  Returns:
    Integer value
  Throws:
    DataSetException - if there is an error getting the data

### asLong

    public long asLong()
                throws DataSetException

  Returns the long value of a Value object.

  Returns:
    Long value
  Throws:
    DataSetException - if there is an error getting the data

### asFloat

    public float asFloat()
                  throws DataSetException

  Returns the float value of a Value object.

  Returns:
    Float value
  Throws:
    DataSetException - if there is an error getting the data

### asDouble

    public double asDouble()
                    throws DataSetException

  Returns the double value of a Value object.

  Returns:
    Double value
  Throws:
    DataSetException - if there is an error getting the data

### asBigDecimal

    public java.math.BigDecimal asBigDecimal(int scale)
                                      throws DataSetException

  Returns the BigDecimal value of a Value object.

  Returns:
    BigDecimal value
  Throws:
    DataSetException - if there is an error getting the data

### asTime

    public java.sql.Time asTime()
                         throws DataSetException

  Returns the java.sql.Time value of a Value object.

  Returns:
    java.sql.Time value
  Throws:
    DataSetException - if the time is invalid

### asDate

    public java.sql.Date asDate()
                         throws DataSetException

  Returns the java.sql.Date value of a Value object.

  Returns:
    java.sql.Date value
  Throws:
    DataSetException - if the date is invalid

### asUtilDate

    public java.util.Date asUtilDate()
                              throws DataSetException

  Returns the java.util.Date value of a Value object.

  Returns:
    java.util.Date value
  Throws:
    DataSetException - if the date is invalid

### asTimestamp

    public java.sql.Timestamp asTimestamp()
                                   throws DataSetException

  Returns the java.sql.Timestamp value of a Value object.

  Returns:
    java.sql.Timestamp value
  Throws:
    DataSetException - if the date is invalid

### asBytes

    public byte[] asBytes()
                   throws DataSetException

  Returns the byte[] value of a Value object.

  Returns:
    byte[] value
  Throws:
    DataSetException - if the date is invalid

### isInt

    public boolean isInt()

  Determines whether the data of this Value object is of type integer.

  Returns:
    True if integer

### isLong

    public boolean isLong()

  Determines whether the data of this Value object is of type integer.

  Returns:
    True if integer

### isFloat

    public boolean isFloat()

  Determines whether the data of this Value object is of type float.

  Returns:
    True if float

### isDouble

    public boolean isDouble()

  Determines whether the data of this Value object is of type double.

  Returns:
    True if double

### isDate

    public boolean isDate()

  Determines whether the data of this Value object is of type java.sql.Date.

  Returns:
    True if java.sql.Date

### isTime

    public boolean isTime()

  Determines whether the data of this Value object is of type java.sql.Time.

  Returns:
    True if java.sql.Time

### isUtilDate

    public boolean isUtilDate()

  Determines whether the data of this Value object is of type java.util.Date.

  Returns:
    True if java.util.Date

### isTimestamp

    public boolean isTimestamp()

  Determines whether the data of this Value object is of type java.sql.Timestamp.

  Returns:
    True if java.sql.Timestamp

### isBigDecimal

    public boolean isBigDecimal()

  Determines whether the data of this Value object is of type BigDecimal.

  Returns:
    True if BigDecimal

### isString

    public boolean isString()

  Determines whether the data of this Value object is of type String.

  Returns:
    True if String

### isBytes

    public boolean isBytes()

  Determines whether the data of this Value object is of type byte[].

  Returns:
    True if byte[]

### isNull

    public boolean isNull()

  Determines whether the data of this Value object is NULL.

  Returns:
    True if NULL

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs60
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD