|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.execute.CurrentDatetime
CurrentDatetime provides execution support for ensuring that the current datetime is evaluated only once for a statement. The same value is returned for every CURRENT_DATE, CURRENT_TIME, and CURRENT_TIMESTAMP in the statement.
This is expected to be used by an activation and its result set, and so 'forget' must be called whenever you want to reuse the CurrentDatetime object for additional executions of the statement.
Field Summary | |
private java.sql.Date |
currentDate
Holds the SQL DATE version of the current datetime. |
private java.util.Date |
currentDatetime
Holds the current datetime on the first evaluation of a current function in a statement, which contains all available fields. |
private java.sql.Time |
currentTime
Holds the SQL TIME version of the current datetime. |
private java.sql.Timestamp |
currentTimestamp
Holds the SQL TIMESTAMP version of the current datetime. |
Constructor Summary | |
CurrentDatetime()
The constructor is public; note we wait until evaluation to put any values into the fields. |
Method Summary | |
void |
forget()
This is called prior to each execution of the statement, to ensure that it starts over with a new current datetime value. |
java.sql.Date |
getCurrentDate()
|
java.sql.Time |
getCurrentTime()
|
java.sql.Timestamp |
getCurrentTimestamp()
|
private void |
setCurrentDatetime()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Date currentDatetime
private java.sql.Date currentDate
private java.sql.Time currentTime
private java.sql.Timestamp currentTimestamp
Constructor Detail |
public CurrentDatetime()
Method Detail |
private final void setCurrentDatetime()
public java.sql.Date getCurrentDate()
public java.sql.Time getCurrentTime()
public java.sql.Timestamp getCurrentTimestamp()
public void forget()
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |