java.lang.Object
org.eclipse.persistence.internal.platform.database.oracle.TIMESTAMPHelper

public class TIMESTAMPHelper extends Object
Used as a helper class for TIMESTAMP, TIMESTAMPTZ and TIMESTAMPLTZ in oracle9.
  • Constructor Details

    • TIMESTAMPHelper

      public TIMESTAMPHelper()
  • Method Details

    • buildTIMESTAMPTZ

      public static oracle.sql.TIMESTAMPTZ buildTIMESTAMPTZ(Calendar cal, Connection con, boolean shouldPrintCalendar) throws SQLException
      This conversion required the use of the literal string to get the same functionality as the native SQL to_timestamp() approach.
      Throws:
      SQLException
    • buildCalendar

      public static Calendar buildCalendar(TIMESTAMPTZWrapper timestampTZ)
      Build a calendar from TIMESTAMPTZWrapper.
    • buildCalendar

      public static Calendar buildCalendar(TIMESTAMPLTZWrapper timestampLTZ)
      Build a calendar from TIMESTAMPLTZWrapper.
    • printCalendar

      public static String printCalendar(Calendar calendar)
      Build a calendar string based on the calendar fields. If the daylight savings time should be printed and the zone is in daylight savings time, print the short representation of daylight savings from the calendar's timezone data.
    • shouldAppendDaylightTime

      public static boolean shouldAppendDaylightTime(Calendar calendar)
      Return true if the calendar supports and is in daylight time (according to its timezone), false otherwise
    • extractTimeZone

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