|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.database.RowData
public class RowData
Represents a row of data to be added into a table. The row data is linked to a TableField that describes the cell information within a row.
There are two types of RowData object. Those that are empty and contain blank data, and those that contain information to either be inserted into a table, or has be retrieved from a row.
NOTE: Any RowData objects that need to be set to 'null' should be done so explicitly. NOTE: We must call a 'setColumnData' method for _every_ column in the row to form. NOTE: This method (or derived classes) must only use safe methods in DataTable. (ie. getRowCount, etc are out).
Field Summary |
---|
Fields inherited from interface com.mckoi.database.global.Types |
---|
DB_BINARY, DB_BLOB, DB_BOOLEAN, DB_NUMERIC, DB_NUMERIC_EXTENDED, DB_OBJECT, DB_STRING, DB_TIME, DB_UNKNOWN |
Constructor Summary | |
---|---|
RowData(TableDataSource table)
The Constructor generates a blank row. |
|
RowData(TransactionSystem system,
int col_count)
To create a RowData object without an underlying table. |
Method Summary | |
---|---|
int |
findFieldName(java.lang.String column_name)
Finds the field in this RowData with the given name. |
TObject |
getCellData(int column)
Returns the TObject that represents the information in the given column of the row. |
int |
getColumnCount()
Returns the number of columns (cells) in this row. |
java.lang.String |
getColumnName(int column)
Returns the name of the given column number. |
void |
setColumnData(int column,
TObject cell)
Sets up a column by casting the value from the given TObject to a type that is compatible with the column. |
void |
setColumnDataFromObject(int column,
java.lang.Object ob)
Sets up a column from an Object. |
void |
setColumnDataFromTObject(int column,
TObject ob)
Sets up a column from a TObject. |
void |
setColumnToDefault(int column,
QueryContext context)
Sets the given column number to the default value for this column. |
void |
setColumnToNull(int column)
This is a special case situation for setting the column cell to 'null'. |
void |
setDefaultForRest(QueryContext context)
Any columns in the row of data that haven't been set yet (they will be 'null') will be set to the default value during this method. |
void |
setupEntire(Assignment[] assignments,
QueryContext context)
Sets up an entire row given the array of assignments. |
void |
setupEntire(int[] col_indices,
Expression[] exps,
QueryContext context)
Sets up an entire row given the array of Expressions and a list of indices to the columns to set. |
void |
setupEntire(int[] col_indices,
java.util.List insert_elements,
QueryContext context)
Sets up an entire row given the list of insert elements and a list of indices to the columns to set. |
java.lang.String |
toString()
Returns a string representation of this row. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RowData(TransactionSystem system, int col_count)
public RowData(TableDataSource table)
Method Detail |
---|
public void setColumnData(int column, TObject cell)
public void setColumnDataFromObject(int column, java.lang.Object ob)
public void setColumnDataFromTObject(int column, TObject ob)
public void setColumnToNull(int column)
public void setColumnToDefault(int column, QueryContext context)
public TObject getCellData(int column)
public java.lang.String getColumnName(int column)
public int findFieldName(java.lang.String column_name)
public int getColumnCount()
public void setDefaultForRest(QueryContext context) throws DatabaseException
DatabaseException
public void setupEntire(Assignment[] assignments, QueryContext context) throws DatabaseException
DatabaseException
public void setupEntire(int[] col_indices, java.util.List insert_elements, QueryContext context) throws DatabaseException
DatabaseException
public void setupEntire(int[] col_indices, Expression[] exps, QueryContext context) throws DatabaseException
DatabaseException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |