|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.expasy.jpl.commons.base.record.DataTable
public final class DataTable
DataTable is a kind of naive relational database table. It handles
Records (a set of data elements) satisfying a signature model (with
typed fields).
DataTableFactory,
Serialized Form| Nested Class Summary | |
|---|---|
class |
DataTable.Record
Data table record internal class (immutable). |
| Method Summary | ||
|---|---|---|
DataTable.Record |
addNewRecord(Properties fieldValues)
Create and add a new instance of internal class Record with
values. |
|
Map<String,DataTableFactory.TypeManager.IType> |
getFields()
Get the field names of this table. |
|
DataTableFactory.TypeManager.IType |
getFieldType(String field)
Get the field type of the given field of this table. |
|
DataTable.Record |
getRecord(int id)
Get the record identified by the given id. |
|
|
getTypeAccessor(String fieldName)
Access field String value from Record. |
|
boolean |
hasField(String name)
Return true if this table has the given field. |
|
Iterator<DataTable.Record> |
iterator()
Get an iterator over the records. |
|
Set<DataTable.Record> |
select(Condition<DataTable.Record> condition)
Select every Records that satisfy the given condition. |
|
int |
size()
|
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public <T> org.apache.commons.collections15.Transformer<DataTable.Record,T> getTypeAccessor(String fieldName)
T - the field type.fieldName - the field name.
public DataTable.Record addNewRecord(Properties fieldValues)
Record with
values.
fieldValues - the field values of the brand new Record.
public DataTable.Record getRecord(int id)
id.
id - the record unique identifier.
public boolean hasField(String name)
this table has the given field.
name - the name of the queried field.
this table has the field.public final Map<String,DataTableFactory.TypeManager.IType> getFields()
this table.
public DataTableFactory.TypeManager.IType getFieldType(String field)
this table.
field - the field name to get the type from.
public Iterator<DataTable.Record> iterator()
iterator in interface Iterable<DataTable.Record>public Set<DataTable.Record> select(Condition<DataTable.Record> condition)
Records that satisfy the given condition.
condition - the condition to test records.
public int size()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||