public class DbDate extends DbDateTime
DbDate class wraps a value of primitive type long
in an object. An object of the type DbDate contains a single
field whose type is long.
In addition, this class provides several methods for the interconversion of
a DbDate and a String,
as well as other constants and methods used when dealing
with a DbDate.
Unknown_DataTimeZone, valueBIGINT_DESC, bNull, CHAR_DESC, CURRENCY_DESC, DATE_DESC, desc, DOUBLE_DESC, INTEGER_DESC, TIME_DESC| Constructor and Description |
|---|
DbDate()
Constructs an uninitialized
DbDate. |
DbDate(java.sql.Date dt)
Constructs an uninitialized
DbDate. |
DbDate(DbColDesc desc)
Constructs an uninitialized
DbDate. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a clone of this
DbDate object. |
java.sql.Date |
getDate()
Returns a
java.sql.Date object using the milliseconds
time value. |
void |
set(JRHierarchicalDataset hds,
int col)
Sets a newly allocated
DbDate object that
represents the long value indicated by the
JRHierarchicalDataset parameter and an index of the column. |
void |
set(java.sql.ResultSet rs,
int col)
Sets a newly allocated
DbDate object that
represents the long value indicated by the
ResultSet parameter and an index of the column. |
void |
setDate(java.sql.Date v)
Sets an existing
Date object
using the given milliseconds date value. |
void |
setValue(java.lang.String v)
Sets a newly allocated
DbDate object that
represents the String value indicated by the
String parameter. |
java.lang.String |
toString()
Returns a
String object representing this
DbDate's value. |
compareTo, equals, get, getDataTimeZone, set, set, setDataTimeZone, toFormatString, toSqlDate, toStringValue, toUtilDatecompareTo, compareTo, compareTo, equals, getColDesc, getPrecision, getScale, getSqlType, isCurrency, isNull, makeDbValue, setColDesc, setfoo, setNull, setValuepublic DbDate()
DbDate. This
DbDate object is mutable until the value and the description of the column are set.public DbDate(java.sql.Date dt)
DbDate. This
DbDate object is mutable until DbColDesc is set.dt - The value holding a java.sql.Date object.public DbDate(DbColDesc desc)
DbDate. This
DbDate object is mutable until the value is set.desc - The value to be represented by the
DbColDesc object.public final java.sql.Date getDate()
java.sql.Date object using the milliseconds
time value. If the milliseconds value contains time
information, this method will return the time component to the
time in the default time zone (the time zone of the Java virtual
machine running the application) that corresponds to zero GMT.public final void setDate(java.sql.Date v)
Date object
using the given milliseconds date value.
It uses Date.getTime() to retrieve value.v - The valid date value.public void set(java.sql.ResultSet rs,
int col)
throws java.sql.SQLException
DbDate object that
represents the long value indicated by the
ResultSet parameter and an index of the column.public void set(JRHierarchicalDataset hds, int col) throws java.sql.SQLException
DbDate object that
represents the long value indicated by the
JRHierarchicalDataset parameter and an index of the column.public java.lang.String toString()
String object representing this
DbDate's value. The value is returned as a string.
If the value is null, it returns "NULL".public java.lang.Object clone()
DbDate object.public void setValue(java.lang.String v)
DbDate object that
represents the String value indicated by the
String parameter.