|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.workingdogs.village.Value
A Value represents a single cell in a database table. In other words, it is the cross between a row and column and contains the information held there.
Field Summary | |
private int |
columnNumber
the column number that this object came from |
private int |
type
what sql type of object is this? |
private java.lang.Object |
valueObject
the object that is stored in this object |
Constructor Summary | |
Value(java.sql.ResultSet rs,
int columnNumber,
int type)
Creates a new Value object based on the ResultSet, columnNumber and type |
Method Summary | |
java.math.BigDecimal |
asBigDecimal()
Get the value as a BigDecimal |
java.math.BigDecimal |
asBigDecimal(int scale)
Get the value as a BigDecimal |
boolean |
asBoolean()
Get the value as a asBoolean |
byte |
asByte()
Get the value as a asByte |
java.lang.Byte |
asByteObj()
Get the value as a Byte Object |
byte[] |
asBytes()
Get the value as a asBytes |
java.sql.Date |
asDate()
Get the value as a asDate |
double |
asDouble()
Get the value as a asDouble |
java.lang.Double |
asDoubleObj()
Get the value as a Double Object |
float |
asFloat()
Get the value as a asFloat |
java.lang.Float |
asFloatObj()
Get the value as a Float Obj |
int |
asInt()
Get the value as a asInt |
java.lang.Integer |
asIntegerObj()
Get the value as a Integer Ojbect |
long |
asLong()
Get the value as a asLong |
java.lang.Long |
asLongObj()
Get the value as a Long Object |
short |
asShort()
Get the value as a asShort |
java.lang.Short |
asShortObj()
Get the value as a Short Object |
java.lang.String |
asString()
Returns the string representation of this object |
java.sql.Time |
asTime()
Get the value as a asTime |
java.sql.Timestamp |
asTimestamp()
Get the value as a asTimestamp |
java.util.Date |
asUtilDate()
Get the value as a asUtilDate |
(package private) int |
columnNumber()
Gets the columnNumber which this value represents. |
(package private) java.lang.Object |
getValue()
Gets the object from this Value |
boolean |
isBigDecimal()
Is the value a isBigDecimal |
boolean |
isBoolean()
Is the value a isBoolean |
boolean |
isByte()
Is the value a isByte |
boolean |
isBytes()
Is the value a isBytes |
boolean |
isDate()
Is the value a isDate |
boolean |
isDouble()
Is the value a isDouble |
boolean |
isFloat()
Is the value a isFloat |
boolean |
isInt()
Is the value a isInt |
boolean |
isLong()
Is the value a isLong |
boolean |
isNull()
Is the value a isNull |
boolean |
isShort()
Is the value a isShort |
boolean |
isString()
Is the value a isString |
boolean |
isTime()
Is the value a isTime |
boolean |
isTimestamp()
Is the value a isTimestamp |
private boolean |
isTrue(java.lang.String value)
|
boolean |
isUtilDate()
Is the value a isUtilDate |
(package private) void |
setPreparedStatementValue(java.sql.PreparedStatement stmt,
int stmtNumber)
This is used in Record in order to do a saveWithInsert/Update/Delete |
(package private) void |
setValue(java.lang.Object value)
Sets the value of this object |
java.lang.String |
toString()
Returns the string representation of this object |
int |
type()
Return the type of this value |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.Object valueObject
private int columnNumber
private int type
Constructor Detail |
public Value(java.sql.ResultSet rs, int columnNumber, int type) throws java.sql.SQLException
rs
- columnNumber
- type
- java.sql.SQLException
- Method Detail |
void setValue(java.lang.Object value)
value
- java.lang.Object getValue()
void setPreparedStatementValue(java.sql.PreparedStatement stmt, int stmtNumber) throws DataSetException, java.sql.SQLException
stmt
- stmtNumber
- DataSetException
- java.sql.SQLException
- public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String asString()
public java.math.BigDecimal asBigDecimal() throws DataSetException
DataSetException
- public java.math.BigDecimal asBigDecimal(int scale) throws DataSetException
DataSetException
- public boolean asBoolean() throws DataSetException
DataSetException
- public int asInt() throws DataSetException
DataSetException
- public java.lang.Integer asIntegerObj() throws DataSetException
DataSetException
- public byte asByte() throws DataSetException
DataSetException
- public java.lang.Byte asByteObj() throws DataSetException
DataSetException
- public byte[] asBytes() throws DataSetException
DataSetException
- public short asShort() throws DataSetException
DataSetException
- public java.lang.Short asShortObj() throws DataSetException
DataSetException
- public long asLong() throws DataSetException
DataSetException
- public java.lang.Long asLongObj() throws DataSetException
DataSetException
- public double asDouble() throws DataSetException
DataSetException
- public java.lang.Double asDoubleObj() throws DataSetException
DataSetException
- public float asFloat() throws DataSetException
DataSetException
- public java.lang.Float asFloatObj() throws DataSetException
DataSetException
- public java.sql.Time asTime() throws DataSetException
DataSetException
- public java.sql.Timestamp asTimestamp() throws DataSetException
DataSetException
- public java.sql.Date asDate() throws DataSetException
DataSetException
- public java.util.Date asUtilDate() throws DataSetException
DataSetException
- public boolean isBigDecimal()
public boolean isByte()
public boolean isBytes()
public boolean isDate()
public boolean isShort()
public boolean isInt()
public boolean isLong()
public boolean isDouble()
public boolean isFloat()
public boolean isBoolean()
public boolean isNull()
public boolean isString()
public boolean isTime()
public boolean isTimestamp()
public boolean isUtilDate()
public int type()
int columnNumber()
private boolean isTrue(java.lang.String value)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |