public class DbBit extends DbValue
DbBit class wraps a value of primitive type boolean
in an object. An object of the type DbBit contains a single
field whose type is boolean.
In addition, this class provides several methods for the interconversion of
a DbBit and a String array,
as well as other constants and methods useed when dealing
with a DbBit.
| Modifier and Type | Field and Description |
|---|---|
boolean |
value
Deprecated.
|
BIGINT_DESC, bNull, CHAR_DESC, CURRENCY_DESC, DATE_DESC, desc, DOUBLE_DESC, INTEGER_DESC, TIME_DESC| Constructor and Description |
|---|
DbBit()
Constructs an uninitialized
DbBit. |
DbBit(boolean val)
Constructs an uninitialized
DbBit. |
DbBit(DbColDesc desc)
Constructs an uninitialized
DbBit. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a clone of this
DbBit object. |
int |
compareTo(DbValue v,
boolean matchSQL)
Compares this
DbBit object with the DbValue object. |
boolean |
equals(DbValue v)
Compares this object to the specified object.
|
boolean |
get()
Returns the value of this
DbBit as a
boolean value. |
void |
set(boolean v)
Sets a newly allocated
DbBit object that
represents the specified boolean argument. |
void |
set(DbValue v)
Sets a newly allocated
DbBit object that
represents the boolean value indicated by the
DbValue parameter. |
void |
set(JRHierarchicalDataset hds,
int col)
Sets a newly allocated
DbBit object that
represents the boolean value indicated by the
JRHierarchicalDataset parameter and an index of the column. |
void |
set(java.sql.ResultSet rs,
int col)
Sets a newly allocated
DbBit object that
represents the boolean value indicated by the
ResultSet parameter and an index of the column. |
void |
setValue(java.lang.String v)
Sets a newly allocated
DbBit object that
represents the boolean value indicated by the
String parameter. |
java.lang.String |
toString()
Returns a
String object representing this
DbBit's value. |
java.lang.String |
toStringValue() |
compareTo, compareTo, compareTo, equals, getColDesc, getDataTimeZone, getPrecision, getScale, getSqlType, isCurrency, isNull, makeDbValue, setColDesc, setfoo, setNull, setValuepublic boolean value
get and set to access it instead of accessing it directly.public DbBit()
DbBit. This
DbBit object is mutable until the value and the description of the column are set.public DbBit(boolean val)
DbBit. This
DbBit object is mutable until DbColDesc is set.val - The value holding the true and false.public DbBit(DbColDesc desc)
DbBit. This
DbBit object is mutable until the value is set.desc - The value to be represented by the
DbColDesc object.public boolean get()
DbBit as a
boolean value.public void set(boolean v)
DbBit object that
represents the specified boolean argument.v - The value to be represented by true and false.public void set(java.sql.ResultSet rs,
int col)
throws java.sql.SQLException
DbBit object that
represents the boolean value indicated by the
ResultSet parameter and an index of the column.public void set(JRHierarchicalDataset hds, int col) throws java.sql.SQLException
DbBit object that
represents the boolean value indicated by the
JRHierarchicalDataset parameter and an index of the column.public java.lang.String toString()
String object representing this
DbBit's value. The value is converted to "true" or "false",
and returned as a string. If the value is null, it returns "NULL".public java.lang.Object clone()
DbBit object.public boolean equals(DbValue v)
true if and only if the argument is not
null but a DbBit object that
contains the same boolean value as this object.public int compareTo(DbValue v, boolean matchSQL)
DbBit object with the DbValue object.
Note that true is greater than false.public void set(DbValue v)
DbBit object that
represents the boolean value indicated by the
DbValue parameter. The DbValue object will be checked to see if it is null.public void setValue(java.lang.String v)
DbBit object that
represents the boolean value indicated by the
String parameter. "1" and "true" will be parsed as true,
other strings, false. Case is ignored.public java.lang.String toStringValue()
toStringValue in class DbValue