public class CurrentDatetime
extends java.lang.Object
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.
Modifier and Type | Field | Description |
---|---|---|
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 | Description |
---|---|
CurrentDatetime() |
The constructor is public; note we wait until evaluation to
put any values into the fields.
|
Modifier and Type | Method | Description |
---|---|---|
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() |
private java.util.Date currentDatetime
private java.sql.Date currentDate
private java.sql.Time currentTime
private java.sql.Timestamp currentTimestamp
public CurrentDatetime()
private final void setCurrentDatetime()
public java.sql.Date getCurrentDate()
public java.sql.Time getCurrentTime()
public java.sql.Timestamp getCurrentTimestamp()
public void forget()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.