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 and Description |
|---|---|
| private Date | currentDate
Holds the SQL DATE version of the current datetime. |
| private Date | currentDatetime
Holds the current datetime on the first evaluation of a current function in a statement, which contains all available fields. |
| private Time | currentTime
Holds the SQL TIME version of the current datetime. |
| private Timestamp | currentTimestamp
Holds the SQL TIMESTAMP version of the current datetime. |
| Access | Constructor and Description |
|---|---|
| public | CurrentDatetime()
The constructor is public; note we wait until evaluation to put any values into the fields. |
| Modifier and Type | Method and Description |
|---|---|
| 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. |
| public Date | |
| public Time | |
| public Timestamp | |
| private final void |
| currentDate | back to summary |
|---|---|
| private Date currentDate Holds the SQL DATE version of the current datetime. | |
| currentDatetime | back to summary |
|---|---|
| private Date currentDatetime Holds the current datetime on the first evaluation of a current function in a statement, which contains all available fields. | |
| currentTime | back to summary |
|---|---|
| private Time currentTime Holds the SQL TIME version of the current datetime. | |
| currentTimestamp | back to summary |
|---|---|
| private Timestamp currentTimestamp Holds the SQL TIMESTAMP version of the current datetime. | |
| CurrentDatetime | back to summary |
|---|---|
| public CurrentDatetime() The constructor is public; note we wait until evaluation to put any values into the fields. | |
| forget | back to summary |
|---|---|
| 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. | |
| getCurrentDate | back to summary |
|---|---|
| public Date getCurrentDate() | |
| getCurrentTime | back to summary |
|---|---|
| public Time getCurrentTime() | |
| getCurrentTimestamp | back to summary |
|---|---|
| public Timestamp getCurrentTimestamp() | |
| setCurrentDatetime | back to summary |
|---|---|
| private final void setCurrentDatetime() | |