|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.sf.imageCave.database.DataTable
An object that represents a table in the Database. Each instance can
have several DataRows.
Database,
DataRow,
DataTableBuilder| Field Summary | |
java.util.Collection |
dataRows
Holds all the DataRow instances that belong to this DataTable. |
java.lang.String[] |
fieldNames
Array of the names of the fields |
| Constructor Summary | |
DataTable(java.lang.String name)
Constructor |
|
| Method Summary | |
void |
addField(java.lang.String f)
Add a new field to the list of fields in this DataTable. |
boolean |
contains(DataRow dr)
|
boolean |
delete(DataRow rowToDelete)
Delete row in this DataTable using rowToDelete
to filter which row should be affected. |
boolean |
delete(DataTable rowsToDelete)
Delete rows in this DataTable using rowsToDelete
to filter which rows should be affected. |
int |
fieldIndex(java.lang.String fieldName)
|
java.lang.String[] |
getFields()
|
java.lang.String |
getName()
|
boolean |
insert(DataRow row)
Insert a new DataRow into this DataTable. |
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
DataTable |
select(java.lang.String filter)
To select rows, either just to grab information, or to select rows to update, or delete, a filter is used for which rows to select. |
void |
setFieldNames(java.lang.String[] f)
|
int |
size()
|
boolean |
update(DataTable rowsToUpdate,
java.lang.String[] fieldsToUpdate,
java.lang.String[] newValues)
Update rows in this DataTable using rowsToUpdate
to filter which rows should be affected. |
int |
width()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.util.Collection dataRows
DataTable.
public java.lang.String[] fieldNames
| Constructor Detail |
public DataTable(java.lang.String name)
| Method Detail |
public void setFieldNames(java.lang.String[] f)
public DataTable select(java.lang.String filter)
To select rows, either just to grab information, or to select rows to update, or delete, a filter is used for which rows to select.
Each string in the array should be of the format: "field=value" the "=" can be replaced with any of these "<",">","!=","<=",">="
filter - a string of boolean logical statements of fields and their values.
public int fieldIndex(java.lang.String fieldName)
public boolean update(DataTable rowsToUpdate,
java.lang.String[] fieldsToUpdate,
java.lang.String[] newValues)
Update rows in this DataTable using rowsToUpdate
to filter which rows should be affected. String arrays of field names and their
new values should line up, repectively.
rowsToUpdate - fieldsToUpdate - newValues -
public boolean delete(DataTable rowsToDelete)
Delete rows in this DataTable using rowsToDelete
to filter which rows should be affected.
rowsToDelete -
public boolean delete(DataRow rowToDelete)
Delete row in this DataTable using rowToDelete
to filter which row should be affected.
rowToDelete -
public boolean insert(DataRow row)
Insert a new DataRow into this DataTable.
row -
public void addField(java.lang.String f)
Add a new field to the list of fields in this DataTable.
f - the name of the new field to add.public boolean contains(DataRow dr)
public int size()
public int width()
public boolean isEmpty()
public java.util.Iterator iterator()
public java.lang.String getName()
public java.lang.String[] getFields()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||