|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Tuple
Tuples are objects representing a row of a data table, providing a simplified interface to table data. They maintain a pointer to a corresponding row in a table. When rows are deleted, any live Tuples for that row become invalidated, and any further attempts to access or set data with that Tuple will result in an exception.
Method Summary | |
---|---|
boolean |
canGet(java.lang.String field,
java.lang.Class type)
Check if the get method for the given data field returns
values that are compatible with a given target type. |
boolean |
canGetBoolean(java.lang.String field)
Check if the given data field can return primitive boolean
values. |
boolean |
canGetDate(java.lang.String field)
Check if the given data field can return Date
values. |
boolean |
canGetDouble(java.lang.String field)
Check if the given data field can return primitive double
values. |
boolean |
canGetFloat(java.lang.String field)
Check if the given data field can return primitive float
values. |
boolean |
canGetInt(java.lang.String field)
Check if the given data field can return primitive int
values. |
boolean |
canGetLong(java.lang.String field)
Check if the given data field can return primitive long
values. |
boolean |
canGetString(java.lang.String field)
Check if the given data field can return String
values. |
boolean |
canSet(java.lang.String field,
java.lang.Class type)
Check if the set method for the given data field can
accept values of a given target type. |
boolean |
canSetBoolean(java.lang.String field)
Check if the setBoolean method can safely be used for the
given data field. |
boolean |
canSetDate(java.lang.String field)
Check if the setDate method can safely be used for the
given data field. |
boolean |
canSetDouble(java.lang.String field)
Check if the setDouble method can safely be used for the
given data field. |
boolean |
canSetFloat(java.lang.String field)
Check if the setFloat method can safely be used for the
given data field. |
boolean |
canSetInt(java.lang.String field)
Check if the setInt method can safely be used for the
given data field. |
boolean |
canSetLong(java.lang.String field)
Check if the setLong method can safely be used for the
given data field. |
boolean |
canSetString(java.lang.String field)
Check if the setString method can safely be used for the
given data field. |
java.lang.Object |
get(int col)
Get the data value at the given column number as an Object. |
java.lang.Object |
get(java.lang.String field)
Get the data value at the given field as an Object. |
boolean |
getBoolean(int col)
Get the data value at the given field as a boolean . |
boolean |
getBoolean(java.lang.String field)
Get the data value at the given field as a boolean . |
int |
getColumnCount()
Get the number of columns maintained by the backing table. |
int |
getColumnIndex(java.lang.String field)
Get the column index corresponding to the given data field. |
java.lang.String |
getColumnName(int col)
Get the data field name of the column at the given index. |
java.lang.Class |
getColumnType(int col)
Returns the data type of the given column as a Java Class instance. |
java.lang.Class |
getColumnType(java.lang.String field)
Returns the data type of the given field as a Java Class instance. |
java.util.Date |
getDate(int col)
Get the data value at the given field as a Date . |
java.util.Date |
getDate(java.lang.String field)
Get the data value at the given field as a Date . |
java.lang.Object |
getDefault(java.lang.String field)
Get the default value for the given data field. |
double |
getDouble(int col)
Get the data value at the given field as a double . |
double |
getDouble(java.lang.String field)
Get the data value at the given field as a double . |
float |
getFloat(int col)
Get the data value at the given field as a float . |
float |
getFloat(java.lang.String field)
Get the data value at the given field as a float . |
int |
getInt(int col)
Get the data value at the given field as an int . |
int |
getInt(java.lang.String field)
Get the data value at the given field as an int . |
long |
getLong(int col)
Get the data value at the given field as a long . |
long |
getLong(java.lang.String field)
Get the data value at the given field as a long . |
int |
getRow()
Returns the row index for this Tuple's backing Table, if it exists. |
Schema |
getSchema()
Returns the schema for this tuple's data. |
java.lang.String |
getString(int col)
Get the data value at the given field as a String . |
java.lang.String |
getString(java.lang.String field)
Get the data value at the given field as a String . |
Table |
getTable()
Returns the Table instance that backs this Tuple, if it exists. |
boolean |
isValid()
Indicates if this Tuple is valid. |
void |
revertToDefault(java.lang.String field)
Revert this tuple's value for the given field to the default value for the field. |
void |
set(int col,
java.lang.Object value)
Set the value of at the given column number. |
void |
set(java.lang.String field,
java.lang.Object value)
Set the value of a given data field. |
void |
setBoolean(int col,
boolean val)
Set the data value of the given field with a boolean . |
void |
setBoolean(java.lang.String field,
boolean val)
Set the data value of the given field with a boolean . |
void |
setDate(int col,
java.util.Date val)
Set the data value of the given field with a Date . |
void |
setDate(java.lang.String field,
java.util.Date val)
Set the data value of the given field with a Date . |
void |
setDouble(int col,
double val)
Set the data value of the given field with a double . |
void |
setDouble(java.lang.String field,
double val)
Set the data value of the given field with a double . |
void |
setFloat(int col,
float val)
Set the data value of the given field with a float . |
void |
setFloat(java.lang.String field,
float val)
Set the data value of the given field with a float . |
void |
setInt(int col,
int val)
Set the data value of the given field with an int . |
void |
setInt(java.lang.String field,
int val)
Set the data value of the given field with an int . |
void |
setLong(int col,
long val)
Set the data value of the given field with a long . |
void |
setLong(java.lang.String field,
long val)
Set the data value of the given field with a long . |
void |
setString(int col,
java.lang.String val)
Set the data value of the given field with a String . |
void |
setString(java.lang.String field,
java.lang.String val)
Set the data value of the given field with a String . |
Method Detail |
---|
Schema getSchema()
Table getTable()
int getRow()
boolean isValid()
java.lang.Class getColumnType(java.lang.String field)
field
- the data field
java.lang.Class getColumnType(int col)
col
- the column index
int getColumnIndex(java.lang.String field)
field
- the data field to look up
int getColumnCount()
java.lang.String getColumnName(int col)
col
- the column index to look up
boolean canGet(java.lang.String field, java.lang.Class type)
get
method for the given data field returns
values that are compatible with a given target type.
field
- the data field to checktype
- a Class instance to check for compatibility with the
data field values.
get(String)
can be cast to the given type.get(String)
boolean canSet(java.lang.String field, java.lang.Class type)
set
method for the given data field can
accept values of a given target type.
field
- the data field to checktype
- a Class instance to check for compatibility with the
data field values.
set(String, Object)
method.set(String, Object)
java.lang.Object get(java.lang.String field)
field
- the data field to retrieve
canGet(String, Class)
,
getColumnType(String)
void set(java.lang.String field, java.lang.Object value)
field
- the data field to setvalue
- the value for the field. If the concrete type of this
Object is not compatible with the underlying data model, an
Exception will be thrown. Use the canSet(String, Class)
method to check the type-safety ahead of time.canSet(String, Class)
,
getColumnType(String)
java.lang.Object get(int col)
col
- the column number
canGet(String, Class)
,
getColumnType(int)
void set(int col, java.lang.Object value)
col
- the column numbervalue
- the value for the field. If the concrete type of this
Object is not compatible with the underlying data model, an
Exception will be thrown. Use the canSet(String, Class)
method to check the type-safety ahead of time.canSet(String, Class)
,
getColumnType(String)
java.lang.Object getDefault(java.lang.String field)
field
- the data field
void revertToDefault(java.lang.String field)
field
- the data fieldgetDefault(String)
boolean canGetInt(java.lang.String field)
int
values.
field
- the data field to check
int
values, false otherwise. If true, the getInt(String)
method
can be used safely.boolean canSetInt(java.lang.String field)
setInt
method can safely be used for the
given data field.
field
- the data field to check
setInt(String, int)
method can safely
be used for the given field, false otherwise.int getInt(java.lang.String field)
int
.
field
- the data field to retrievecanGetInt(String)
void setInt(java.lang.String field, int val)
int
.
field
- the data field to setval
- the value to setcanSetInt(String)
int getInt(int col)
int
.
col
- the column number of the data field to retrievecanGetInt(String)
void setInt(int col, int val)
int
.
col
- the column number of the data field to setval
- the value to setcanSetInt(String)
boolean canGetLong(java.lang.String field)
long
values.
field
- the data field to check
long
values, false otherwise. If true, the getLong(String)
method
can be used safely.boolean canSetLong(java.lang.String field)
setLong
method can safely be used for the
given data field.
field
- the data field to check
setLong(String, long)
method can safely
be used for the given field, false otherwise.long getLong(java.lang.String field)
long
.
field
- the data field to retrievecanGetLong(String)
void setLong(java.lang.String field, long val)
long
.
field
- the data field to setval
- the value to setcanSetLong(String)
long getLong(int col)
long
.
col
- the column number of the data field to retrievecanGetLong(String)
void setLong(int col, long val)
long
.
col
- the column number of the data field to setval
- the value to setcanSetLong(String)
boolean canGetFloat(java.lang.String field)
float
values.
field
- the data field to check
float
values, false otherwise. If true, the getFloat(String)
method
can be used safely.boolean canSetFloat(java.lang.String field)
setFloat
method can safely be used for the
given data field.
field
- the data field to check
setFloat(String, float)
method can safely
be used for the given field, false otherwise.float getFloat(java.lang.String field)
float
.
field
- the data field to retrievecanGetFloat(String)
void setFloat(java.lang.String field, float val)
float
.
field
- the data field to setval
- the value to setcanSetFloat(String)
float getFloat(int col)
float
.
col
- the column number of the data field to retrievecanGetFloat(String)
void setFloat(int col, float val)
float
.
col
- the column number of the data field to setval
- the value to setcanSetFloat(String)
boolean canGetDouble(java.lang.String field)
double
values.
field
- the data field to check
double
values, false otherwise. If true, the getDouble(String)
method
can be used safely.boolean canSetDouble(java.lang.String field)
setDouble
method can safely be used for the
given data field.
field
- the data field to check
setDouble(String, double)
method can safely
be used for the given field, false otherwise.double getDouble(java.lang.String field)
double
.
field
- the data field to retrievecanGetDouble(String)
void setDouble(java.lang.String field, double val)
double
.
field
- the data field to setval
- the value to setcanSetDouble(String)
double getDouble(int col)
double
.
col
- the column number of the data field to retrievecanGetDouble(String)
void setDouble(int col, double val)
double
.
col
- the column number of the data field to setval
- the value to setcanSetDouble(String)
boolean canGetBoolean(java.lang.String field)
boolean
values.
field
- the data field to check
boolean
values, false otherwise. If true, the getBoolean(String)
method
can be used safely.boolean canSetBoolean(java.lang.String field)
setBoolean
method can safely be used for the
given data field.
field
- the data field to check
setBoolean(String, boolean)
method can
safely be used for the given field, false otherwise.boolean getBoolean(java.lang.String field)
boolean
.
field
- the data field to retrievecanGetBoolean(String)
void setBoolean(java.lang.String field, boolean val)
boolean
.
field
- the data field to setval
- the value to setcanSetBoolean(String)
boolean getBoolean(int col)
boolean
.
col
- the column number of the data field to retrievecanGetBoolean(String)
void setBoolean(int col, boolean val)
boolean
.
col
- the column number of the data field to setval
- the value to setcanSetBoolean(String)
boolean canGetString(java.lang.String field)
String
values.
field
- the data field to check
String
values, false otherwise. If true, the getString(String)
method
can be used safely.boolean canSetString(java.lang.String field)
setString
method can safely be used for the
given data field.
field
- the data field to check
setString(String, String)
method can safely
be used for the given field, false otherwise.java.lang.String getString(java.lang.String field)
String
.
field
- the data field to retrievecanGetString(String)
void setString(java.lang.String field, java.lang.String val)
String
.
field
- the data field to setval
- the value to setcanSetString(String)
java.lang.String getString(int col)
String
.
col
- the column number of the data field to retrievecanGetString(String)
void setString(int col, java.lang.String val)
String
.
col
- the column number of the data field to setval
- the value to setcanSetString(String)
boolean canGetDate(java.lang.String field)
Date
values.
field
- the data field to check
Date
values, false otherwise. If true, the getDate(String)
method
can be used safely.boolean canSetDate(java.lang.String field)
setDate
method can safely be used for the
given data field.
field
- the data field to check
setDate(String, Date)
method can safely
be used for the given field, false otherwise.java.util.Date getDate(java.lang.String field)
Date
.
field
- the data field to retrievecanGetDate(String)
void setDate(java.lang.String field, java.util.Date val)
Date
.
field
- the data field to setval
- the value to setcanSetDate(String)
java.util.Date getDate(int col)
Date
.
col
- the column number of the data field to retrievecanGetDate(String)
void setDate(int col, java.util.Date val)
Date
.
col
- the column number of the data field to setval
- the value to setcanSetDate(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |