public class DbTime extends DbDateTime
DbTime class wraps a value of primitive type long
in an object. An object of the type DbTime contains a single
field whose type is long.
In addition, this class provides several methods for the interconversion of
a DbTime and a String,
as well as other constants and methods used when dealing
with a DbTime.
Unknown_DataTimeZone, valueBIGINT_DESC, bNull, CHAR_DESC, CURRENCY_DESC, DATE_DESC, desc, DOUBLE_DESC, INTEGER_DESC, TIME_DESC| Constructor and Description |
|---|
DbTime()
Constructs an uninitialized
DbTime. |
DbTime(DbColDesc desc)
Constructs an uninitialized
DbTime. |
DbTime(Time v)
Constructs an uninitialized
DbTime. |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates a clone of this
DbTime object. |
Time |
getTime()
Returns a
java.sql.Time object using the milliseconds
time value. |
void |
set(JRHierarchicalDataset hds,
int col)
Sets a newly allocated
DbTime object that
represents the long value indicated by the
JRHierarchicalDataset parameter and an index of column. |
void |
set(ResultSet rs,
int col)
Sets a newly allocated
DbTime object that
represents the long value indicated by the
ResultSet parameter and an index of column. |
void |
setTime(Time v)
Sets an existing
java.sql.Time object
using the given milliseconds time value. |
void |
setValue(String v)
Sets a newly allocated
DbTime object that
represents the String value indicated by the
String parameter. |
String |
toString()
Returns a
String object representing this
DbTime's value. |
compareTo, equals, get, getDataTimeZone, getFullValue, set, set, setDataTimeZone, setFullValue, toFormatString, toSqlDate, toStringValue, toUtilDatecompareTo, compareTo, compareTo, equals, getColDesc, getPrecision, getScale, getSqlType, isCurrency, isNull, makeDbValue, setColDesc, setfoo, setNull, setValuepublic DbTime()
DbTime. This
DbTime object is mutable until the value and the description of the column are set.public DbTime(Time v)
DbTime. This
DbTime object is mutable until DbColDesc is set.v - The value holding a java.sql.Time object.public DbTime(DbColDesc desc)
DbTime. This
DbTime object is mutable until the value is set.desc - The value to be represented by the
DbColDesc object.public Time getTime()
java.sql.Time object using the milliseconds
time value.public void setTime(Time v)
java.sql.Time object
using the given milliseconds time value.
It uses Time.getTime() to retrieve value.v - the valid Time valuepublic void set(ResultSet rs, int col) throws SQLException
DbTime object that
represents the long value indicated by the
ResultSet parameter and an index of column.set in class DbValuers - The ResultSet to be fetched.col - The index of the column.SQLException - if the ResultSet does not
contain the index.public void set(JRHierarchicalDataset hds, int col) throws SQLException
DbTime object that
represents the long value indicated by the
JRHierarchicalDataset parameter and an index of column.set in class DbValuehds - The JRHierarchicalDataset to be fetched.col - The index of the column.SQLException - if the ResultSet does not
contain the index.public String toString()
String object representing this
DbTime's value. The value is returned as a string.
If the value is null, it returns "NULL".public Object clone()
DbTime object.© insightsoftware. All rights reserved.