|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public Schema getSchema()
public Table getTable()
public int getRow()
public boolean isValid()
public java.lang.Class getColumnType(java.lang.String field)
field
- the data field
public java.lang.Class getColumnType(int col)
col
- the column index
public int getColumnIndex(java.lang.String field)
field
- the data field to look up
public int getColumnCount()
public java.lang.String getColumnName(int col)
col
- the column index to look up
public 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)
public 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)
public java.lang.Object get(java.lang.String field)
field
- the data field to retrieve
canGet(String, Class)
,
getColumnType(String)
public 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)
public java.lang.Object get(int col)
col
- the column number
canGet(String, Class)
,
getColumnType(int)
public 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)
public java.lang.Object getDefault(java.lang.String field)
field
- the data field
public void revertToDefault(java.lang.String field)
field
- the data fieldgetDefault(String)
public 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.public 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.public int getInt(java.lang.String field)
int
.
field
- the data field to retrievecanGetInt(String)
public void setInt(java.lang.String field, int val)
int
.
field
- the data field to setval
- the value to setcanSetInt(String)
public int getInt(int col)
int
.
col
- the column number of the data field to retrievecanGetInt(String)
public void setInt(int col, int val)
int
.
col
- the column number of the data field to setval
- the value to setcanSetInt(String)
public 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.public 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.public long getLong(java.lang.String field)
long
.
field
- the data field to retrievecanGetLong(String)
public void setLong(java.lang.String field, long val)
long
.
field
- the data field to setval
- the value to setcanSetLong(String)
public long getLong(int col)
long
.
col
- the column number of the data field to retrievecanGetLong(String)
public void setLong(int col, long val)
long
.
col
- the column number of the data field to setval
- the value to setcanSetLong(String)
public 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.public 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.public float getFloat(java.lang.String field)
float
.
field
- the data field to retrievecanGetFloat(String)
public void setFloat(java.lang.String field, float val)
float
.
field
- the data field to setval
- the value to setcanSetFloat(String)
public float getFloat(int col)
float
.
col
- the column number of the data field to retrievecanGetFloat(String)
public void setFloat(int col, float val)
float
.
col
- the column number of the data field to setval
- the value to setcanSetFloat(String)
public 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.public 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.public double getDouble(java.lang.String field)
double
.
field
- the data field to retrievecanGetDouble(String)
public void setDouble(java.lang.String field, double val)
double
.
field
- the data field to setval
- the value to setcanSetDouble(String)
public double getDouble(int col)
double
.
col
- the column number of the data field to retrievecanGetDouble(String)
public void setDouble(int col, double val)
double
.
col
- the column number of the data field to setval
- the value to setcanSetDouble(String)
public 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.public 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.public boolean getBoolean(java.lang.String field)
boolean
.
field
- the data field to retrievecanGetBoolean(String)
public void setBoolean(java.lang.String field, boolean val)
boolean
.
field
- the data field to setval
- the value to setcanSetBoolean(String)
public boolean getBoolean(int col)
boolean
.
col
- the column number of the data field to retrievecanGetBoolean(String)
public void setBoolean(int col, boolean val)
boolean
.
col
- the column number of the data field to setval
- the value to setcanSetBoolean(String)
public 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.public 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.public java.lang.String getString(java.lang.String field)
String
.
field
- the data field to retrievecanGetString(String)
public void setString(java.lang.String field, java.lang.String val)
String
.
field
- the data field to setval
- the value to setcanSetString(String)
public java.lang.String getString(int col)
String
.
col
- the column number of the data field to retrievecanGetString(String)
public void setString(int col, java.lang.String val)
String
.
col
- the column number of the data field to setval
- the value to setcanSetString(String)
public 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.public 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.public java.util.Date getDate(java.lang.String field)
Date
.
field
- the data field to retrievecanGetDate(String)
public void setDate(java.lang.String field, java.util.Date val)
Date
.
field
- the data field to setval
- the value to setcanSetDate(String)
public java.util.Date getDate(int col)
Date
.
col
- the column number of the data field to retrievecanGetDate(String)
public 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 |