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

oracle.sql
Class TIMESTAMPLTZ

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

public class TIMESTAMPLTZ
extends Datum

TIMESTAMPLTZ Class


The TIMESTAMPLTZ class provides conversions between the Oracle Date (ldx_t) data type and Java classes java.sql.Date, java.sql.Time, java.sql.Timestamp

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

      Byte       Represents
       0         Century (119 for 1990)
       1         Decade  (190 for 1990)
       2         Month
       3         Day      
       4         Hour
       5         Minute
       6         Seconds
       7         Nanoseconds (Most Significant bit)
       8         Nanoseconds
       9         Nanoseconds
       10        Nanoseconds (Least Significant Bit)
  
-We add 100 to the century and decade fields so that negative values will be positive and positive values will be higher than negative values -We add 1 to the month,hour,minute,second fields for the java objects since they start of from 0.

Static methods are used for conversions.

Since:
release specific (what release of product did this appear in)
See Also:
Serialized Form

Field Summary
static java.lang.String BUILD_DATE
           
static boolean TRACE
           
 
Constructor Summary
TIMESTAMPLTZ()
          Constructs a TIMESTAMPLTZ object initialized to 1/1/1970.
TIMESTAMPLTZ(byte[] timestampltz)
          Create an Oracle TIMESTAMPLTZ object represented by the given Oracle Timestampltz
TIMESTAMPLTZ(java.sql.Connection conn, java.util.Calendar sess, java.sql.Date date)
          Create an Oracle TIMESTAMPLTZ object represented by the java Date
TIMESTAMPLTZ(java.sql.Connection conn, java.util.Calendar sess, DATE date)
          Create an Oracle TIMESTAMPLTZ object represented by the Oracle date
TIMESTAMPLTZ(java.sql.Connection conn, java.util.Calendar sess, java.lang.String str)
          Deprecated.  
TIMESTAMPLTZ(java.sql.Connection conn, java.util.Calendar sess, java.sql.Time time)
          Create an Oracle TIMESTAMPLTZ object represented by the given java Time
TIMESTAMPLTZ(java.sql.Connection conn, java.util.Calendar sess, java.sql.Timestamp timestamp)
          Create an Oracle TIMESTAMPLTZ object represented by the java Timestamp
TIMESTAMPLTZ(java.sql.Connection conn, java.sql.Date date)
          Create an Oracle TIMESTAMPLTZ object represented by the java Date
TIMESTAMPLTZ(java.sql.Connection conn, DATE date)
          Create an Oracle TIMESTAMPLTZ object represented by the Oracle date
TIMESTAMPLTZ(java.sql.Connection conn, java.sql.Date date, java.util.Calendar dbtz)
          Deprecated.  
TIMESTAMPLTZ(java.sql.Connection conn, DATE date, java.util.Calendar dbtz)
          Deprecated.  
TIMESTAMPLTZ(java.sql.Connection conn, java.lang.String str)
          Deprecated.  
TIMESTAMPLTZ(java.sql.Connection conn, java.lang.String str, java.util.Calendar dbtz)
          Deprecated.  
TIMESTAMPLTZ(java.sql.Connection conn, java.sql.Time time)
          Create an Oracle TIMESTAMPLTZ object represented by the given java Time
TIMESTAMPLTZ(java.sql.Connection conn, java.sql.Time time, java.util.Calendar dbtz)
          Deprecated.  
TIMESTAMPLTZ(java.sql.Connection conn, java.sql.Timestamp timestamp)
          Create an Oracle TIMESTAMPLTZ object represented by the java Timestamp
TIMESTAMPLTZ(java.sql.Connection conn, java.sql.Timestamp timestamp, java.util.Calendar dbtz)
          Deprecated.  
 
Method Summary
 java.sql.Date dateValue(java.sql.Connection conn)
          Calls toDate(Connection, byte[]) to convert internal Oracle TIMESTAMPLTZ to a Java Date.
 java.sql.Date dateValue(java.sql.Connection conn, java.util.Calendar cal)
          Calls toDate(Connection, byte[], Calendar) to convert internal Oracle TIMESTAMPLTZ to a Java Date.
 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(java.sql.Connection conn)
          Calls toString(Connection, byte[]) to convert internal Oracle TIMESTAMPLTZ to a Java String.
 java.lang.String stringValue(java.sql.Connection conn, java.util.Calendar cal)
          Calls toString(Connection, byte[], Calendar) to convert internal Oracle TIMESTAMPLTZ to a Java String.
 java.sql.Timestamp timestampValue(java.sql.Connection conn, java.util.Calendar dbtz)
          Calls toTimestamp to convert internal Oracle Date to a Java Timestamp.
 java.sql.Time timeValue(java.sql.Connection conn)
          Calls toTime to convert internal Oracle Date to a Java Time.
 java.sql.Time timeValue(java.sql.Connection conn, java.util.Calendar cal)
          Calls toTime to convert internal Oracle Date to a Java Time.
 byte[] toBytes()
          Convert Oracle Timestampltz object into a byte array
static byte[] toBytes(java.sql.Connection conn, java.util.Calendar cal, java.sql.Date date)
          Convert Java Date to Oracle TIMESTAMPLTZ.
static byte[] toBytes(java.sql.Connection conn, java.util.Calendar cal, DATE date)
          Convert Oracle DATE to Oracle Timestampltz
static byte[] toBytes(java.sql.Connection conn, java.util.Calendar sess, java.lang.String str)
          Convert Java String to Oracle TIMESTAMPLTZ.
static byte[] toBytes(java.sql.Connection conn, java.util.Calendar cal, java.sql.Time time)
          Convert Java Time to Oracle TIMESTAMPLTZ.
static byte[] toBytes(java.sql.Connection conn, java.util.Calendar cal, java.sql.Timestamp timestamp)
          Convert Java Timestamp to Oracle TIMESTAMPLTZ
static byte[] toBytes(java.sql.Connection conn, java.sql.Date date, java.util.Calendar dbtz)
          Deprecated.  
static byte[] toBytes(java.sql.Connection conn, DATE date, java.util.Calendar dbtz)
          Deprecated.  
static byte[] toBytes(java.sql.Connection conn, java.lang.String str, java.util.Calendar dbtz)
          Convert Java String to Oracle TIMESTAMPLTZ.
static byte[] toBytes(java.sql.Connection conn, java.sql.Time time, java.util.Calendar dbtz)
          Deprecated.  
static byte[] toBytes(java.sql.Connection conn, java.sql.Timestamp timestamp, java.util.Calendar dbtz)
          Deprecated.  
static java.sql.Date toDate(java.sql.Connection conn, byte[] timestamp)
          Convert a byte array representing a TIMESTAMPLTZ object to a Java Date Object
static DATE toDATE(java.sql.Connection conn, byte[] timestamp)
          Convert a byte array representing a TIMESTAMPLTZ object to a Oracle Date Object
static java.sql.Date toDate(java.sql.Connection conn, byte[] timestamp, java.util.Calendar dbtz)
          Convert a byte array representing a TIMESTAMPLTZ object to a Java Date Object
static DATE toDATE(java.sql.Connection conn, byte[] timestamp, java.util.Calendar dbtz)
          Convert a byte array representing a TIMESTAMPLTZ object to a Oracle Date Object
 java.lang.Object toJdbc()
          Returns the JDBC representation of the datum object
static java.lang.String toString(java.sql.Connection conn, byte[] timestamp)
          Converts a TIMESTAMP to a string
static java.lang.String toString(java.sql.Connection conn, byte[] timestamp, java.util.Calendar dbtz)
          Deprecated.  
static java.sql.Time toTime(java.sql.Connection conn, byte[] timestamp)
          Convert a byte array representing a TIMESTAMPLTZ object to a Java Time Object
static java.sql.Time toTime(java.sql.Connection conn, byte[] timestamp, java.util.Calendar dbtz)
          Convert a byte array representing a TIMESTAMPLTZ object to a Java Time Object
static java.sql.Timestamp toTimestamp(java.sql.Connection conn, byte[] timestamptz)
          Convert a byte array representing a TIMESTAMP object to a Java Timestamp Object
static TIMESTAMP toTIMESTAMP(java.sql.Connection conn, byte[] timestamp)
          Convert a byte array representing a TIMESTAMPLTZ object to a Oracle TIMESTAMP Object
static java.sql.Timestamp toTimestamp(java.sql.Connection conn, byte[] timestamp, java.util.Calendar dbtz)
          Convert a byte array representing a TIMESTAMP object to a Java Timestamp Object
static TIMESTAMPTZ toTIMESTAMPTZ(java.sql.Connection conn, byte[] timestamp)
          Convert a byte array representing a TIMESTAMPLTZ object to a Oracle TIMESTAMPTZ Object
 
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, toString, wait, wait, wait
 

Field Detail

BUILD_DATE

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

TRACE

public static final boolean TRACE
See Also:
Constant Field Values
Constructor Detail

TIMESTAMPLTZ

public TIMESTAMPLTZ()
Constructs a TIMESTAMPLTZ object initialized to 1/1/1970.


TIMESTAMPLTZ

public TIMESTAMPLTZ(byte[] timestampltz)
Create an Oracle TIMESTAMPLTZ object represented by the given Oracle Timestampltz

Parameters:
Connection - conn

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.sql.Time time,
                    java.util.Calendar dbtz)
             throws java.sql.SQLException
Deprecated. 

Create an Oracle TIMESTAMPLTZ object represented by the given java Time

Parameters:
conn - JDBC connection time Java Time object dbtz Calendar object containing Database Timezone
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.sql.Date date,
                    java.util.Calendar dbtz)
             throws java.sql.SQLException
Deprecated. 

Create an Oracle TIMESTAMPLTZ object represented by the java Date

Parameters:
conn - JDBC connection date Java Date object dbtz Calendar object containing Database Timezone
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.sql.Timestamp timestamp,
                    java.util.Calendar dbtz)
             throws java.sql.SQLException
Deprecated. 

Create an Oracle TIMESTAMPLTZ object represented by the java Timestamp

Parameters:
conn - Connection timestamp Java Timestamp object dbtz Calendar object containing Database Timezone
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    DATE date,
                    java.util.Calendar dbtz)
             throws java.sql.SQLException
Deprecated. 

Create an Oracle TIMESTAMPLTZ object represented by the Oracle date

Parameters:
conn - JDBC connection date Oracle DATE object dbtz Calendar object containing Database Timezone
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.lang.String str,
                    java.util.Calendar dbtz)
             throws java.sql.SQLException
Deprecated. 

Create a TIMESTAMPLTZ object given a Java String object.

Parameters:
conn - JDBC connection str Java String object dbtz Calendar object containing Database Timezone
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.util.Calendar sess,
                    java.sql.Time time)
             throws java.sql.SQLException
Create an Oracle TIMESTAMPLTZ object represented by the given java Time

Parameters:
conn - JDBC connection sess Calendar object containing Session Timezone time Java Time object
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.util.Calendar sess,
                    java.sql.Date date)
             throws java.sql.SQLException
Create an Oracle TIMESTAMPLTZ object represented by the java Date

Parameters:
conn - JDBC connection sess Calendar object containing Session Timezone date Java Date object
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.util.Calendar sess,
                    java.sql.Timestamp timestamp)
             throws java.sql.SQLException
Create an Oracle TIMESTAMPLTZ object represented by the java Timestamp

Parameters:
conn - Connection sess Calendar object containing Session Timezone timestamp Java Timestamp object
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.util.Calendar sess,
                    DATE date)
             throws java.sql.SQLException
Create an Oracle TIMESTAMPLTZ object represented by the Oracle date

Parameters:
conn - JDBC connection sess Calendar object containing Session Timezone date Oracle DATE object
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.util.Calendar sess,
                    java.lang.String str)
             throws java.sql.SQLException
Deprecated. 

Create a TIMESTAMPLTZ object given a Java String object.

Parameters:
conn - JDBC connection sess Calendar object containing Session Timezone str Java String object
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.sql.Time time)
             throws java.sql.SQLException
Create an Oracle TIMESTAMPLTZ object represented by the given java Time

Parameters:
conn - JDBC connection time Java Time object
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.sql.Date date)
             throws java.sql.SQLException
Create an Oracle TIMESTAMPLTZ object represented by the java Date

Parameters:
conn - JDBC connection date Java Date object
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.sql.Timestamp timestamp)
             throws java.sql.SQLException
Create an Oracle TIMESTAMPLTZ object represented by the java Timestamp

Parameters:
conn - Connection timestamp Java Timestamp object
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    DATE date)
             throws java.sql.SQLException
Create an Oracle TIMESTAMPLTZ object represented by the Oracle date

Parameters:
conn - JDBC connection date Oracle DATE object
Throws:
java.sql.SQLException

TIMESTAMPLTZ

public TIMESTAMPLTZ(java.sql.Connection conn,
                    java.lang.String str)
             throws java.sql.SQLException
Deprecated. 

Create a TIMESTAMPLTZ object given a Java String object.

Parameters:
conn - JDBC connection str Java String object
Throws:
java.sql.SQLException
Method Detail

toDate

public static java.sql.Date toDate(java.sql.Connection conn,
                                   byte[] timestamp,
                                   java.util.Calendar dbtz)
                            throws java.sql.SQLException
Convert a byte array representing a TIMESTAMPLTZ object to a Java Date Object

Throws:
java.sql.SQLException

toTime

public static java.sql.Time toTime(java.sql.Connection conn,
                                   byte[] timestamp,
                                   java.util.Calendar dbtz)
                            throws java.sql.SQLException
Convert a byte array representing a TIMESTAMPLTZ object to a Java Time Object

Throws:
java.sql.SQLException

toTimestamp

public static java.sql.Timestamp toTimestamp(java.sql.Connection conn,
                                             byte[] timestamp,
                                             java.util.Calendar dbtz)
                                      throws java.sql.SQLException
Convert a byte array representing a TIMESTAMP object to a Java Timestamp Object

Throws:
java.sql.SQLException

toDATE

public static DATE toDATE(java.sql.Connection conn,
                          byte[] timestamp,
                          java.util.Calendar dbtz)
                   throws java.sql.SQLException
Convert a byte array representing a TIMESTAMPLTZ object to a Oracle Date Object

Throws:
java.sql.SQLException

timestampValue

public java.sql.Timestamp timestampValue(java.sql.Connection conn,
                                         java.util.Calendar dbtz)
                                  throws java.sql.SQLException
Calls toTimestamp to convert internal Oracle Date to a Java Timestamp.

Returns:
a Java Timestamp value
Throws:
java.sql.SQLException

toString

public static java.lang.String toString(java.sql.Connection conn,
                                        byte[] timestamp,
                                        java.util.Calendar dbtz)
                                 throws java.sql.SQLException
Deprecated. 

Converts a TIMESTAMP to a string

Parameters:
date - a byte array
Returns:
String representing the date
Throws:
java.sql.SQLException

toBytes

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

Returns:
the byte array stored in the TIMESTAMPLTZ object

toBytes

public static byte[] toBytes(java.sql.Connection conn,
                             java.sql.Time time,
                             java.util.Calendar dbtz)
                      throws java.sql.SQLException
Deprecated. 

Convert Java Time to Oracle TIMESTAMPLTZ.

Parameters:
conn - JDBC connection time java.sql.Time object to be converted. dbtz Database timezone
Returns:
the byte array representing the java Time.
Throws:
java.sql.SQLException

toBytes

public static byte[] toBytes(java.sql.Connection conn,
                             java.sql.Date date,
                             java.util.Calendar dbtz)
                      throws java.sql.SQLException
Deprecated. 

Convert Java Date to Oracle TIMESTAMPLTZ.

Parameters:
conn - JDBC connection date java.sql.Date object to be converted. dbtz Database timezone
Returns:
the byte array representing the java Date.
Throws:
java.sql.SQLException

toBytes

public static byte[] toBytes(java.sql.Connection conn,
                             java.sql.Timestamp timestamp,
                             java.util.Calendar dbtz)
                      throws java.sql.SQLException
Deprecated. 

Convert Java Timestamp to Oracle TIMESTAMPLTZ

Parameters:
conn - JDBC connection Timestamp java.sql.Timestamp object to be converted. dbtz database timezone
Returns:
the byte array representing the input date.
Throws:
java.sql.SQLException

toBytes

public static byte[] toBytes(java.sql.Connection conn,
                             DATE date,
                             java.util.Calendar dbtz)
                      throws java.sql.SQLException
Deprecated. 

Convert Oracle DATE to Oracle Timestampltz

Parameters:
conn - JDBC connection date oracle.sql.Timestampltz object to be converted. dbtz database timezone
Returns:
the byte array representing the oracle DATE.
Throws:
java.sql.SQLException

toBytes

public static byte[] toBytes(java.sql.Connection conn,
                             java.lang.String str,
                             java.util.Calendar dbtz)
                      throws java.sql.SQLException
Convert Java String to Oracle TIMESTAMPLTZ.

Parameters:
conn - JDBC Connection str java.lang.String object to be converted. dbtz database timezone
Returns:
the byte array representing the input string.
Throws:
java.sql.SQLException

toDate

public static java.sql.Date toDate(java.sql.Connection conn,
                                   byte[] timestamp)
                            throws java.sql.SQLException
Convert a byte array representing a TIMESTAMPLTZ object to a Java Date Object

Throws:
java.sql.SQLException

toTime

public static java.sql.Time toTime(java.sql.Connection conn,
                                   byte[] timestamp)
                            throws java.sql.SQLException
Convert a byte array representing a TIMESTAMPLTZ object to a Java Time Object

Throws:
java.sql.SQLException

toTimestamp

public static java.sql.Timestamp toTimestamp(java.sql.Connection conn,
                                             byte[] timestamptz)
                                      throws java.sql.SQLException
Convert a byte array representing a TIMESTAMP object to a Java Timestamp Object

Throws:
java.sql.SQLException

toDATE

public static DATE toDATE(java.sql.Connection conn,
                          byte[] timestamp)
                   throws java.sql.SQLException
Convert a byte array representing a TIMESTAMPLTZ object to a Oracle Date Object

Throws:
java.sql.SQLException

toTIMESTAMP

public static TIMESTAMP toTIMESTAMP(java.sql.Connection conn,
                                    byte[] timestamp)
                             throws java.sql.SQLException
Convert a byte array representing a TIMESTAMPLTZ object to a Oracle TIMESTAMP Object

Throws:
java.sql.SQLException

toTIMESTAMPTZ

public static TIMESTAMPTZ toTIMESTAMPTZ(java.sql.Connection conn,
                                        byte[] timestamp)
                                 throws java.sql.SQLException
Convert a byte array representing a TIMESTAMPLTZ object to a Oracle TIMESTAMPTZ Object

Throws:
java.sql.SQLException

toString

public static java.lang.String toString(java.sql.Connection conn,
                                        byte[] timestamp)
                                 throws java.sql.SQLException
Converts a TIMESTAMP to a string

Parameters:
date - a byte array
Returns:
String representing the date
Throws:
java.sql.SQLException

toBytes

public static byte[] toBytes(java.sql.Connection conn,
                             java.util.Calendar cal,
                             java.sql.Time time)
                      throws java.sql.SQLException
Convert Java Time to Oracle TIMESTAMPLTZ.

Parameters:
conn - JDBC connection cal Session timezone time java.sql.Time object to be converted.
Returns:
the byte array representing the java Time.
Throws:
java.sql.SQLException

toBytes

public static byte[] toBytes(java.sql.Connection conn,
                             java.util.Calendar cal,
                             java.sql.Date date)
                      throws java.sql.SQLException
Convert Java Date to Oracle TIMESTAMPLTZ.

Parameters:
conn - JDBC connection cal Session timezone date java.sql.Date object to be converted.
Returns:
the byte array representing the java Date.
Throws:
java.sql.SQLException

toBytes

public static byte[] toBytes(java.sql.Connection conn,
                             java.util.Calendar cal,
                             java.sql.Timestamp timestamp)
                      throws java.sql.SQLException
Convert Java Timestamp to Oracle TIMESTAMPLTZ

Parameters:
conn - JDBC connection cal Session timezone Timestamp java.sql.Timestamp object to be converted.
Returns:
the byte array representing the input date.
Throws:
java.sql.SQLException

toBytes

public static byte[] toBytes(java.sql.Connection conn,
                             java.util.Calendar cal,
                             DATE date)
                      throws java.sql.SQLException
Convert Oracle DATE to Oracle Timestampltz

Parameters:
conn - JDBC connection cal Session timezone date oracle.sql.Timestampltz object to be converted.
Returns:
the byte array representing the oracle DATE.
Throws:
java.sql.SQLException

toBytes

public static byte[] toBytes(java.sql.Connection conn,
                             java.util.Calendar sess,
                             java.lang.String str)
                      throws java.sql.SQLException
Convert Java String to Oracle TIMESTAMPLTZ.

Parameters:
conn - JDBC Connection sess Calendar object containing Session Timezone str java.lang.String object to be converted.
Returns:
the byte array representing the input string.
Throws:
java.sql.SQLException

stringValue

public java.lang.String stringValue(java.sql.Connection conn)
                             throws java.sql.SQLException
Calls toString(Connection, byte[]) to convert internal Oracle TIMESTAMPLTZ to a Java String.

Overrides:
stringValue in class Datum
Parameters:
conn - oracle.JDBC.OracleConnection object
Returns:
a Java String value
Throws:
java.sql.SQLException

stringValue

public java.lang.String stringValue(java.sql.Connection conn,
                                    java.util.Calendar cal)
                             throws java.sql.SQLException
Calls toString(Connection, byte[], Calendar) to convert internal Oracle TIMESTAMPLTZ to a Java String.

Parameters:
conn - oracle.JDBC.OracleConnection object cal java.util.Calendar object
Returns:
a Java String value
Throws:
java.sql.SQLException

dateValue

public java.sql.Date dateValue(java.sql.Connection conn,
                               java.util.Calendar cal)
                        throws java.sql.SQLException
Calls toDate(Connection, byte[], Calendar) to convert internal Oracle TIMESTAMPLTZ to a Java Date.

Parameters:
conn - JDBC Connection object cal java.util.Calendar object
Returns:
a Java Date
Throws:
java.sql.SQLException

dateValue

public java.sql.Date dateValue(java.sql.Connection conn)
                        throws java.sql.SQLException
Calls toDate(Connection, byte[]) to convert internal Oracle TIMESTAMPLTZ to a Java Date.

Parameters:
conn - JDBC Connection object
Returns:
a Java Date
Throws:
java.sql.SQLException

timeValue

public java.sql.Time timeValue(java.sql.Connection conn)
                        throws java.sql.SQLException
Calls toTime to convert internal Oracle Date to a Java Time.

Returns:
a Java Time value
Throws:
java.sql.SQLException

timeValue

public java.sql.Time timeValue(java.sql.Connection conn,
                               java.util.Calendar cal)
                        throws java.sql.SQLException
Calls toTime to convert internal Oracle Date to a Java Time.

Returns:
a Java Time value
Throws:
java.sql.SQLException

toJdbc

public java.lang.Object toJdbc()
                        throws java.sql.SQLException
Returns the JDBC representation of the datum object

Specified by:
toJdbc in class Datum
Returns:
an object containing the JDBC value
Throws:
java.sql.SQLException - if conversion to JDBC representation results in an error

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

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

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

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