public class CursorData extends java.lang.Object implements OptimisticLock, java.lang.Cloneable
Cursor| Constructor and Description |
|---|
CursorData(java.lang.String name)
Constructor for CursorData.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
clone will copy the column definitions, but will not clone the values set for this
CursorData.
|
CursorData |
cloneAll()
clone will copy the column definitions including the values
|
boolean |
equals(java.lang.Object obj)
determines if two objects are equal by comparing their hashCodes
|
int |
getChecksum()
get the checksum value
|
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 |
getDataType(int idx) |
double |
getDoubleValue(int idx)
get the value of the column at the given index as a double
|
double |
getDoubleValue(java.lang.String name)
get the double balue belonging to the column identified by name
|
int |
getIndex(java.lang.String name)
get the index of 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
|
long |
getLongValue(int idx)
get the value of the column at the given index as a long.
|
long |
getLongValue(java.lang.String name)
get the longValue 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.String |
getString(int idx) |
java.lang.String |
getString(java.lang.String name) |
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()
get a hash for the particular object that implements
this interface.
|
boolean |
removeColumn(int idx) |
boolean |
removeColumn(java.lang.String x) |
int |
serialID() |
void |
setChecksum(int value)
set the checksum value.
|
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)
Deprecated.
|
void |
setDataType(int idx,
int dataType) |
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
|
public CursorData(java.lang.String name)
name - String, the name of the data source for information
purposes onlypublic 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 columnpublic 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 identifierpublic java.lang.Class getColumnType(int idx)
idx - int, the index of the columnpublic int getDataType(int idx)
public void setDataType(int idx,
int dataType)
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)@Deprecated
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 columnnull if no
previous value was setpublic double getDoubleValue(int idx)
idx - int, the index of the columnjava.lang.NumberFormatException - If the value set to this specific column cannot be cast to an intpublic double getDoubleValue(java.lang.String name)
name - String, the name of the columnjava.lang.NumberFormatException - If the value set to this specific column cannot be cast to an intpublic java.lang.String getString(int idx)
public java.lang.String getString(java.lang.String name)
public int getIntValue(int idx)
idx - int, the index of the columnjava.lang.NumberFormatException - If the value set to this specific column cannot be cast to an intpublic long getLongValue(int idx)
idx - int, the index of the columnjava.lang.NumberFormatException - If the value set to this specific column cannot be cast to an intpublic long getLongValue(java.lang.String name)
name - String, the name of the columnjava.lang.NumberFormatException - If the value set to this specific column cannot be cast to an intpublic java.lang.Object getValue(java.lang.String name)
name - String, the column identifierpublic int getIntValue(java.lang.String name)
name - String, the name of the columnjava.lang.NumberFormatException - If the value set to this specific column cannot be cast to an intpublic int getIndex(java.lang.String name)
name - String, the column identifierpublic int getChecksum()
OptimisticLockgetChecksum in interface OptimisticLockpublic void setChecksum(int value)
OptimisticLocksetChecksum in interface OptimisticLockvalue - int, the new checksum valuepublic int hashCode()
OptimisticLockHere to remind you: You cannot rely on Object.hashCode()
to implement a meaningfull OptimisticLock
hashCode in interface OptimisticLockhashCode in class java.lang.ObjectObject.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.ObjectObject.clone()public CursorData cloneAll()
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
rowNo - int, the position to setpublic 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.ObjectObject.equals(Object)public int serialID()
serialID in interface OptimisticLockpublic boolean removeColumn(int idx)
public boolean removeColumn(java.lang.String x)