Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.java.sql
Class BaseDate

java.lang.Object
  extended by java.util.Date
      extended by oracle.adfnmc.java.sql.BaseDate
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
Date

public class BaseDate
extends java.util.Date
implements Comparable


Field Summary
static java.lang.Class CLASS_INSTANCE
           
 
Constructor Summary
BaseDate(long theDate)
           
 
Method Summary
static int compare(java.util.Date d1, java.util.Date d2)
           
 int compareTo(java.lang.Object another)
          Answers an integer indicating the relative positions of the receiver and the argument in the natural order of elements of the receiver's class.
static java.util.Date parseDate(java.lang.String input)
          Parses the input string representing a date and returns a corresponding Date object.
 void setTime(long theTime)
          Sets this date to a date supplied as a milliseconds value.
 java.lang.String toString()
          Produces a string representation of the Date in SQL format
static BaseDate valueOfInternal(java.lang.String dateString)
          Creates a Date from a string representation of a date in SQL format.
 
Methods inherited from class java.util.Date
equals, getTime, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE
Constructor Detail

BaseDate

public BaseDate(long theDate)
Method Detail

setTime

public void setTime(long theTime)
Sets this date to a date supplied as a milliseconds value. The date is set based on the supplied time value after removing any time elements finer than a day, based on zero GMT for that day.

Overrides:
setTime in class java.util.Date
Parameters:
theTime - the time in milliseconds since the Epoch

toString

public java.lang.String toString()
Produces a string representation of the Date in SQL format

Overrides:
toString in class java.util.Date
Returns:
a string representation of the Date in SQL format - "yyyy-mm-dd".

valueOfInternal

public static BaseDate valueOfInternal(java.lang.String dateString)
Creates a Date from a string representation of a date in SQL format.

Parameters:
dateString - the string representation of a date in SQL format - "yyyy-mm-dd".
Returns:
the Date object
Throws:
java.lang.IllegalArgumentException - if the format of the supplied string does not match the SQL format.

parseDate

public static final java.util.Date parseDate(java.lang.String input)
                                      throws java.lang.IllegalArgumentException
Parses the input string representing a date and returns a corresponding Date object.

Parameters:
input - Expected to be in format "2007-11-09"
Returns:
Date object, or null if there was a problem
Throws:
java.lang.IllegalArgumentException

compare

public static final int compare(java.util.Date d1,
                                java.util.Date d2)

compareTo

public int compareTo(java.lang.Object another)
Description copied from interface: Comparable
Answers an integer indicating the relative positions of the receiver and the argument in the natural order of elements of the receiver's class.

Specified by:
compareTo in interface Comparable
Parameters:
another - Object an object to compare the receiver to
Returns:
int which should be <0 if the receiver should sort before the argument, 0 if the receiver should sort in the same position as the argument, and >0 if the receiver should sort after the argument.

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.