|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Date
oracle.adfnmc.java.sql.Timestamp
public class Timestamp
A Java representation of the SQL TIMESTAMP type. It provides the capability to represent the SQL TIMESTAMP nanosecond value, in addition to the regular date/time value which has millisecond resolution.
The Timestamp class consists of a regular Date/Time value, where only the integral seconds value is stored, plus a nanoseconds value where the fractional seconds are stored.
The addition of the nanosecond value field to the Timestamp object makes it significantly different from the java.util.Date object which it extends. Users should be cautious in their use of Timestamp objects and should not assume that they are interchangeable with java.util.Date objects when used outside the confines of the java.sql package.
Field Summary | |
---|---|
static java.lang.Class |
CLASS_INSTANCE
|
static java.lang.String |
CLASS_INSTANCE_NAME
|
Constructor Summary | |
---|---|
Timestamp(long theTime)
Returns a Timestamp object corresponding to the time represented by a supplied time value. |
Method Summary | |
---|---|
boolean |
after(Timestamp theTimestamp)
Returns true if this timestamp object is later than the supplied timestamp, otherwise returns false. |
boolean |
before(Timestamp theTimestamp)
Returns true if this timestamp object is earlier than the supplied timestamp, otherwise returns false. |
int |
compareTo(java.util.Date theObject)
Compares this Timestamp object with a supplied Timestamp object |
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. |
int |
compareTo(Timestamp theTimestamp)
Compares this Timestamp object with a supplied Timestamp object |
boolean |
equals(java.lang.Object theObject)
Tests to see if this timestamp is equal to a supplied object. |
boolean |
equals(Timestamp theTimestamp)
Tests to see if this timestamp is equal to a supplied timestamp. |
int |
getNanos()
Gets this Timestamp's nanosecond value |
long |
getTime()
Returns the time represented by this Timestamp object, as a long value containing the number of milliseconds since the Epoch (January 1 1970, 00:00:00.000 GMT) |
void |
setNanos(int n)
Sets the nanosecond value for this timestamp |
void |
setTime(long theTime)
Sets the time represented by this Timestamp object to the supplied time, defined as the number of milliseconds since the Epoch (January 1 1970, 00:00:00.000 GMT) |
java.lang.String |
toString()
Returns the timestamp formatted as a String in the JDBC Timestamp Escape format, which is of the form "yyyy-mm-dd hh:mm:ss.nnnnnnnnn" |
static Timestamp |
valueOf(java.lang.String input)
Creates a Timestamp object with a time value equal to the time specified by a supplied String holding the time in JDBC timestamp escape format, which is of the form "yyyy-mm-dd hh:mm:ss.nnnnnnnnn" |
Methods inherited from class java.util.Date |
---|
hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Class CLASS_INSTANCE
public static final java.lang.String CLASS_INSTANCE_NAME
Constructor Detail |
---|
public Timestamp(long theTime)
theTime
- a time value in the format of milliseconds since the Epoch (January 1 1970 00:00:00.000 GMT)Method Detail |
---|
public boolean after(Timestamp theTimestamp)
theTimestamp
- the timestamp to compare with this timestamp object
public boolean before(Timestamp theTimestamp)
theTimestamp
- the timestamp to compare with this timestamp object
public int compareTo(java.util.Date theObject) throws java.lang.ClassCastException
theObject
- the timestamp to compare with this timestamp object, passed in as an Object
java.lang.ClassCastException
- if the supplied object is not a Timestamp objectpublic int compareTo(Timestamp theTimestamp)
theTimestamp
- the timestamp to compare with this timestamp object, passed in as a Timestamp
public boolean equals(java.lang.Object theObject)
equals
in class java.util.Date
theObject
-
public boolean equals(Timestamp theTimestamp)
theTimestamp
- the timestamp to compare with this timestamp object, passed in as an Object
public int getNanos()
public long getTime()
getTime
in class java.util.Date
public void setNanos(int n) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setTime(long theTime)
setTime
in class java.util.Date
public java.lang.String toString()
toString
in class java.util.Date
public static Timestamp valueOf(java.lang.String input) throws java.lang.IllegalArgumentException
s
- the String containing a time in JDBC timestamp escape format
java.lang.IllegalArgumentException
public int compareTo(java.lang.Object another)
Comparable
compareTo
in interface Comparable
another
- Object an object to compare the receiver to
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |