Oracle JDBC API Reference
11g Release 2 ("11.2.0.3.0")

oracle.sql
Class INTERVALDS

java.lang.Object
  extended by oracle.sql.Datum
      extended by oracle.sql.INTERVALDS
All Implemented Interfaces:
java.io.Serializable

public class INTERVALDS
extends Datum

INTERVALDS Class


The INTERVALDS class specifies a value to be used to measure time differences.

The internal data for this object is stored as a 11 byte array in the super class' storage area. The bytes are arranged as follows:

      Byte       Represents
       0         High byte of day
       1         2nd high byte of day
       2         3rd high byte of day
       3         least byte of day   
       4         hour val + 60     
       5         min + 60
       6         sec + 60
       7         High byte of Fractional second
       8         2nd high byte of Fractional Second
       9         3rd high byte of Fractional Second
       10        least byte of Fractional Second
  

Static methods are used for conversions.

See Also:
Serialized Form

Constructor Summary
INTERVALDS()
          Constructs a INTERVALDS object initialized with .
INTERVALDS(byte[] intervalDS)
          Create an Oracle INTERVALDS object represented by the given intervalDS byte array
INTERVALDS(java.lang.String str)
          Create an Oracle INTERVALDS object represented by the given String
 
Method Summary
 boolean isConvertibleTo(java.lang.Class cls)
          Determines if the object can be converted to a particular class
 java.lang.Object makeJdbcArray(int arraySize)
          Returns a JDBC array representation of the datum
 java.lang.String stringValue()
          Returns String for this INTERVALDS object
 byte[] toBytes()
          Convert Oracle INTERVALDS object into a byte array
static byte[] toBytes(java.lang.String str)
          Convert Java String to Oracle INTERVALDS.
 java.lang.Object toJdbc()
          Returns the JDBC representation of the INTERVALDS object
 java.lang.String toString()
          Converts a INTERVALDS to a string
static java.lang.String toString(byte[] inparray)
          Converts a INTERVALDS to a string
 
Methods inherited from class oracle.sql.Datum
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, byteValue, characterStreamValue, dateValue, doubleValue, equals, floatValue, getBytes, getLength, getStream, intValue, longValue, setBytes, setShareBytes, shareBytes, stringValue, timestampValue, timestampValue, timeValue, timeValue
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

INTERVALDS

public INTERVALDS()
Constructs a INTERVALDS object initialized with .


INTERVALDS

public INTERVALDS(byte[] intervalDS)
Create an Oracle INTERVALDS object represented by the given intervalDS byte array

Parameters:
intervalDS - byte array

INTERVALDS

public INTERVALDS(java.lang.String str)
Create an Oracle INTERVALDS object represented by the given String

Parameters:
str - Java String object
Method Detail

toBytes

public byte[] toBytes()
Convert Oracle INTERVALDS object into a byte array

Returns:
the byte array stored in the INTERVALDS object

toBytes

public static byte[] toBytes(java.lang.String str)
Convert Java String to Oracle INTERVALDS.

Parameters:
str - java.lang.String object to be converted.
Returns:
the byte array representing the input string.

toString

public static java.lang.String toString(byte[] inparray)
Converts a INTERVALDS to a string

Parameters:
inparray - a byte array representing the INTERVALDS object
Returns:
String representing the INTERVALDS object

toJdbc

public java.lang.Object toJdbc()
Returns the JDBC representation of the INTERVALDS object

Specified by:
toJdbc in class Datum
Returns:
an object containing the JDBC value

stringValue

public java.lang.String stringValue()
Returns String for this INTERVALDS object

Overrides:
stringValue in class Datum
Returns:
a Java String value

toString

public java.lang.String toString()
Converts a INTERVALDS to a string

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

isConvertibleTo

public boolean isConvertibleTo(java.lang.Class cls)
Determines if the object can be converted to a particular class

Specified by:
isConvertibleTo in class Datum
Parameters:
cls - Class to convert to
Returns:
true, if conversion to cls is permitted false, if conversion to cls is not permitted

makeJdbcArray

public java.lang.Object makeJdbcArray(int arraySize)
Returns a JDBC array representation of the datum

Specified by:
makeJdbcArray in class Datum
Parameters:
arraySize - size of the array
Returns:
an object containing the JDBC array value

Oracle JDBC API Reference
11g Release 2 ("11.2.0.3.0")

Copyright © 1998, 2007, Oracle. All rights reserved.