|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjet.connect.DbValue
jet.connect.DbDateTime
jet.connect.DbTime
public class DbTime
The 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.
| Field Summary |
|---|
| Fields inherited from class jet.connect.DbDateTime |
|---|
value |
| Fields inherited from class jet.connect.DbValue |
|---|
bNull, CHAR_DESC, CURRENCY_DESC, DATE_DESC, desc, DOUBLE_DESC, INTEGER_DESC, TIME_DESC |
| Fields inherited from interface jet.util.DbValueable |
|---|
EQUAL, GREATER, LESS |
| Constructor Summary | |
|---|---|
DbTime()
Constructs an uninitialized DbTime. |
|
DbTime(DbColDesc desc)
Constructs an uninitialized DbTime. |
|
DbTime(java.sql.Time v)
Constructs an uninitialized DbTime. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Creates a clone of this DbTime object. |
java.sql.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(java.sql.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(java.sql.Time v)
Sets an existing java.sql.Time object
using the given milliseconds time value. |
void |
setValue(java.lang.String v)
Sets a newly allocated DbTime object that
represents the String value indicated by the
String parameter. |
java.lang.String |
toString()
Returns a String object representing this
DbTime's value. |
| Methods inherited from class jet.connect.DbDateTime |
|---|
compareTo, equals, get, set, set, toFormatString, toSqlDate, toStringValue, toUtilDate |
| Methods inherited from class jet.connect.DbValue |
|---|
compareTo, compareTo, equals, getColDesc, getPrecision, getScale, getSqlType, isCurrency, isNull, makeDbValue, setColDesc, setfoo, setNull, setValue |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DbTime()
DbTime. This
DbTime object is mutable until the value and the description of the column are set.
public DbTime(java.sql.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.| Method Detail |
|---|
public java.sql.Time getTime()
java.sql.Time object using the milliseconds
time value.
public void setTime(java.sql.Time v)
java.sql.Time object
using the given milliseconds time value.
It uses Time.getTime() to retrieve value.
v - the valid Time value
public void set(java.sql.ResultSet rs,
int col)
throws java.sql.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.
java.sql.SQLException - if the ResultSet does not
contain the index.
public void set(JRHierarchicalDataset hds,
int col)
throws java.sql.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.
java.sql.SQLException - if the ResultSet does not
contain the index.public java.lang.String toString()
String object representing this
DbTime's value. The value is returned as a string.
If the value is null, it returns "NULL".
toString in class DbValuepublic java.lang.Object clone()
DbTime object.
clone in interface jet.util.DbValueableclone in class DbValuepublic void setValue(java.lang.String v)
DbTime object that
represents the String value indicated by the
String parameter.
setValue in class DbValuev - The String to be converted to a
DbTime. The time is in the format "hh:mm:ss".
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||