|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.brains2b.data.cursor.CursorData
Object for containing results from a Cursor
Constructor Summary | |
CursorData(java.lang.String name)
Constructor for CursorData. |
Method Summary | |
java.lang.Object |
clone()
clone will copy the column definitions, but will not clone the values set for this CursorData. |
boolean |
equals(java.lang.Object obj)
determines if two objects are equal by comparing their hashCodes |
int |
getChecksum()
implemented to be consistent with a system that might use optimistic locking for normal data access |
java.lang.String |
getColumn(int idx)
get the column identifier for the column at the given index |
int |
getColumnCount()
get the number of fields in this cursor data object |
java.lang.Class |
getColumnType(int idx)
get the column type for the column given by the specified index |
java.lang.Class |
getColumnType(java.lang.String name)
get the column type for the column identified by name |
int |
getIntValue(int idx)
get the value of the column at the given index as an integer. |
int |
getIntValue(java.lang.String name)
get the intValue belonging to the column identified by name |
java.lang.String |
getName()
get the name of the Cursor this CursorData object is a result for |
int |
getRowNo()
get the position of this CursorData object in a collection |
java.lang.Object |
getValue(int idx)
get the value of the column at the given index as an Object |
java.lang.Object |
getValue(java.lang.String name)
get the value of the column identified by name as an Object |
int |
hashCode()
implemented to be consistent with a system that might use optimistic locking for normal data access |
void |
setChecksum(int value)
implemented to be consistent with a system that might use optimistic locking for normal data access |
void |
setColumn(int idx,
java.lang.String name)
set a column identified by name at the specified position |
void |
setColumnType(int idx,
java.lang.Class c)
set the Class identifying the type of content for this column by index. |
void |
setColumnValue(int idx,
java.lang.String name,
java.lang.Object value)
convinience method to set the column name and value at once at a given index |
void |
setName(java.lang.String name)
set the name of the Cursor this CursorData object is a result for |
void |
setRowNo(int rowNo)
set the position of this CursorData object in a collection |
void |
setValue(int idx,
java.lang.Object value)
set the content value for the specified index |
void |
setValue(java.lang.String name,
java.lang.Object value)
set the content value for the column identified by name |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CursorData(java.lang.String name)
name
- String, the name of the data source for information
purposes onlyMethod Detail |
public int getColumnCount()
public void setColumn(int idx, java.lang.String name)
idx
- int, the index to set the column toname
- String, the identifier for this columnpublic java.lang.String getColumn(int idx)
idx
- int, the index of the column
public void setColumnType(int idx, java.lang.Class c)
idx
- int, the index of the columnc
- Class, the class identifying the content for this column.
Use the Integer.TYPE, Boolean.TYPE, etc. for the primitivespublic java.lang.Class getColumnType(java.lang.String name)
name
- String, the column identifier
public java.lang.Class getColumnType(int idx)
idx
- int, the index of the column
public void setValue(int idx, java.lang.Object value)
idx
- int, the index of the columnvalue
- Object, the value for this specific column. The type of Object
should be consistent with the type of column you defined through setColumnType(int,Class)
setColumnType(int, Class)
public void setValue(java.lang.String name, java.lang.Object value)
name
- String, the column identifiervalue
- Object, the value for this specific column. The type of Object
should be consistent with the type of column you defined through setColumnType(int,Class)
setColumnType(int, Class)
public void setColumnValue(int idx, java.lang.String name, java.lang.Object value)
idx
- int, the index of the columnname
- String, the column identifiervalue
- Object, the value for this specific column. You can set the column type
afterwards. The value and type should be consistentpublic java.lang.Object getValue(int idx)
idx
- int, the index of the column
null
if no
previous value was setpublic int getIntValue(int idx)
idx
- int, the index of the column
NumberFormatException,
- If the value set to this specific column cannot be cast to an int
public java.lang.Object getValue(java.lang.String name)
name
- String, the column identifier
public int getIntValue(java.lang.String name)
name
- String, the name of the column
NumberFormatException,
- If the value set to this specific column cannot be cast to an int
public int getChecksum()
getChecksum
in interface OptimisticLock
OptimisticLock.getChecksum()
public void setChecksum(int value)
setChecksum
in interface OptimisticLock
value
- int, the new checksum valueOptimisticLock.setChecksum(int)
public int hashCode()
hashCode
in interface OptimisticLock
hashCode
in class java.lang.Object
OptimisticLock.hashCode()
public java.lang.Object clone()
This is mostly used to get from a prototype to a real CursorData object
clone
in class java.lang.Object
Object.clone()
,
Cursor.getProtoType(ResultSetMetaData)
public int getRowNo()
This value is set by the select
procedure itself and does
not have to be consistent with List.indexOf(Object)
and is used
to update
a specific cursor object
public void setRowNo(int rowNo)
This value is set by the select
procedure itself and does
not have to be consistent with List.indexOf(Object)
. It is used
to update
a specific cursor object
public java.lang.String getName()
public void setName(java.lang.String name)
name
- String, the name to setpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |