org.apache.derby.impl.sql.execute
Class CurrentDatetime
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.CurrentDatetime
-
public class CurrentDatetime extends java.lang.ObjectCurrentDatetime 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.
-
-
Constructor Summary
Constructors Constructor and Description CurrentDatetime()The constructor is public; note we wait until evaluation to put any values into the fields.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidforget()This is called prior to each execution of the statement, to ensure that it starts over with a new current datetime value.java.sql.DategetCurrentDate()java.sql.TimegetCurrentTime()java.sql.TimestampgetCurrentTimestamp()
-
-
-
Constructor Detail
-
CurrentDatetime
public CurrentDatetime()
The constructor is public; note we wait until evaluation to put any values into the fields.
-
-
Method Detail
-
getCurrentDate
public java.sql.Date getCurrentDate()
-
getCurrentTime
public java.sql.Time getCurrentTime()
-
getCurrentTimestamp
public java.sql.Timestamp getCurrentTimestamp()
-
forget
public void forget()
This is called prior to each execution of the statement, to ensure that it starts over with a new current datetime value.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG