|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jet.connect.DbValue jet.connect.DbNumber jet.connect.DbSmallInt
public class DbSmallInt
The DbSmallInt
class wraps a value of the primitive type short
in an object. An object of the type DbSmallInt
contains a
single field whose type is short
.
In addition, this class provides several methods for converting
a DbSmallInt
to a String
or other number types,
as well as other constants and methods used when dealing
with a DbSmallInt
.
Field Summary | |
---|---|
short |
value
Deprecated. |
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 | |
---|---|
DbSmallInt()
Constructs an uninitialized DbSmallInt . |
|
DbSmallInt(DbColDesc desc)
Constructs an uninitialized DbSmallInt . |
Method Summary | |
---|---|
byte |
byteValue()
Returns the value of this DbSmallInt as a
byte . |
java.lang.Object |
clone()
Creates a clone of this DbSmallInt object. |
double |
doubleValue()
Returns the value of this DbSmallInt as a
double . |
boolean |
equals(DbNumber v)
Compares this object to the specified object. |
float |
floatValue()
Returns the value of this DbSmallInt as a
float . |
short |
get()
Returns the value of this DbSmallInt as a
short value. |
int |
intValue()
Returns the value of this DbSmallInt as an
int . |
long |
longValue()
Returns the value of this DbSmallInt as a
long value. |
void |
set(JRHierarchicalDataset hds,
int col)
Sets a newly allocated DbSmallInt object that
represents the short value indicated by the
JRHierarchicalDataset parameter and an index of the column. |
void |
set(java.sql.ResultSet rs,
int col)
Sets a newly allocated DbSmallInt object that
represents the short value indicated by the
ResultSet parameter and an index of the column. |
void |
set(short v)
Sets a newly allocated DbSmallInt object that
represents the specified short argument. |
void |
setValue(DbNumber v)
Sets a newly allocated DbSmallInt object that
represents the short value indicated by the
DbNumber parameter. |
void |
setValue(java.lang.String v)
Sets a newly allocated DbSmallInt object that
represents the short value indicated by the
String parameter. |
short |
shortValue()
Returns the value of this DbSmallInt as a
short . |
java.lang.String |
toString()
Returns a String object representing this
DbSmallInt 's value. |
java.lang.String |
toStringValue()
|
Methods inherited from class jet.connect.DbNumber |
---|
compare, compareTo, equals, set |
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 |
Field Detail |
---|
public short value
get
and set
to access it instead of accessing it directly.
Constructor Detail |
---|
public DbSmallInt()
DbSmallInt
. This
DbSmallInt
object is mutable until a nonzero value
and the description of column are set.
public DbSmallInt(DbColDesc desc)
DbSmallInt
. This
DbSmallInt
object is mutable until the value is set.
desc
- The value to be represented by the
DbColDesc
object.Method Detail |
---|
public short get()
DbSmallInt
as a
short
value.
public void set(short v)
DbSmallInt
object that
represents the specified short
argument.
v
- The short value to be represented by the
DbSmallInt
object.public void set(java.sql.ResultSet rs, int col) throws java.sql.SQLException
DbSmallInt
object that
represents the short
value indicated by the
ResultSet
parameter and an index of the column.
set
in class DbValue
rs
- 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
DbSmallInt
object that
represents the short
value indicated by the
JRHierarchicalDataset
parameter and an index of the column.
set
in class DbValue
hds
- 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
DbSmallInt
's value. The value is converted to signed
decimal representation and returned as a string.
If the value is null, it returns "NULL".
toString
in class DbValue
public java.lang.Object clone()
DbSmallInt
object.
clone
in interface jet.util.DbValueable
clone
in class DbValue
public boolean equals(DbNumber v)
true
if and only if the argument is not
null
but a DbSmallInt
object that
contains the same DbNumber
value as this object.
equals
in class DbNumber
obj
- The DbNumber object to be compared with.
true
if the objects are the same;
false
otherwise.public byte byteValue()
DbSmallInt
as a
byte
.
byteValue
in class DbNumber
public short shortValue()
DbSmallInt
as a
short
.
shortValue
in class DbNumber
public int intValue()
DbSmallInt
as an
int
.
intValue
in class DbNumber
public long longValue()
DbSmallInt
as a
long
value.
longValue
in class DbNumber
public float floatValue()
DbSmallInt
as a
float
.
floatValue
in class DbNumber
public double doubleValue()
DbSmallInt
as a
double
.
doubleValue
in class DbNumber
public void setValue(DbNumber v)
DbSmallInt
object that
represents the short
value indicated by the
DbNumber
parameter. The DbNumber object will be checked to see if it is null,
setValue
in class DbNumber
v
- The DbNumber
to be converted to a
DbSmallInt
. If it is null, the value will not be set.public void setValue(java.lang.String v)
DbSmallInt
object that
represents the short
value indicated by the
String
parameter. The string is converted to a
short
value in exactly the manner used by the
parseShort
method for radix 10.
setValue
in class DbValue
v
- The String
to be converted to a
DbSmallInt
. The argument is
interpreted as representing a signed decimal short
,
which is exactly as if the argument were given to the parseShort
method.public java.lang.String toStringValue()
toStringValue
in class DbValue
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |