Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.internal.platform.database.oracle
Class TIMESTAMPHelper

java.lang.Object
  extended byoracle.toplink.internal.platform.database.oracle.TIMESTAMPHelper


public class TIMESTAMPHelper
extends java.lang.Object

Used as a helper class for TIMESTAMP, TIMESTAMPTZ and TIMESTAMPLTZ in oracle9.


Constructor Summary
TIMESTAMPHelper()

Method Summary
static void assignMillisecond(java.util.Calendar cal, java.sql.Timestamp ts)
Assign milliseconds to Calendar specifically for JDK13 to overcome the bug.
static java.util.Calendar buildCalendar(CalendarWrapper timestampLTZ)
Build a calendar from CalendarWrapper.
static java.util.Calendar buildCalendar(oracle.sql.TIMESTAMPTZ timestampTZ)
Build a calendar from TIMESTAMPTZ.
static java.sql.Timestamp buildTimestamp(CalendarWrapper timestampLTZ)
Build a Timestamp from CalendarWrapper.
static oracle.sql.TIMESTAMPTZ buildTIMESTAMPTZ(java.util.Calendar cal, java.sql.Connection con)
This conversion required the use of the literal string to get the same functionality as the native SQL to_timestamp() approach.
static java.lang.String buildZeroPrefix(int value, int totalDigits)
Build a number string with leading 0s.
static java.lang.String calendarString(java.util.Calendar calendar, boolean includeTimeZone)
Build a calendar string based on the calendar fields.
static java.util.TimeZone extractTimeZone(byte[] bytes)
Extract TimeZone from TIMESTAMPTZ.

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

Constructor Detail

TIMESTAMPHelper

public TIMESTAMPHelper()

Method Detail

buildTIMESTAMPTZ

public static oracle.sql.TIMESTAMPTZ buildTIMESTAMPTZ(java.util.Calendar cal,
                                                      java.sql.Connection con)
This conversion required the use of the literal string to get the same functionality as the native SQL to_timestamp() approach.

buildCalendar

public static java.util.Calendar buildCalendar(oracle.sql.TIMESTAMPTZ timestampTZ)
                                        throws java.sql.SQLException
Build a calendar from TIMESTAMPTZ.
Throws:
java.sql.SQLException

buildCalendar

public static java.util.Calendar buildCalendar(CalendarWrapper timestampLTZ)
                                        throws java.sql.SQLException
Build a calendar from CalendarWrapper.
Throws:
java.sql.SQLException

buildTimestamp

public static java.sql.Timestamp buildTimestamp(CalendarWrapper timestampLTZ)
                                         throws java.sql.SQLException
Build a Timestamp from CalendarWrapper.
Throws:
java.sql.SQLException

assignMillisecond

public static void assignMillisecond(java.util.Calendar cal,
                                     java.sql.Timestamp ts)
Assign milliseconds to Calendar specifically for JDK13 to overcome the bug.

calendarString

public static java.lang.String calendarString(java.util.Calendar calendar,
                                              boolean includeTimeZone)
Build a calendar string based on the calendar fields. includeTimeZone indicates if the TimeZone part of the string is required.

buildZeroPrefix

public static java.lang.String buildZeroPrefix(int value,
                                               int totalDigits)
Build a number string with leading 0s. value is an existing number string. totalDigits is the number of the totally required digits. The existing number string will be prefixed with 0s.

extractTimeZone

public static java.util.TimeZone extractTimeZone(byte[] bytes)
Extract TimeZone from TIMESTAMPTZ.

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.