|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.data.DataTable.Schema
This class represents the schema of the table which specifies the attributes belonging to the table.
| Field Summary | |
protected java.util.Map |
attributeTable
|
protected java.util.Collection |
primaryKeys
|
| Constructor Summary | |
DataTable.Schema()
|
|
DataTable.Schema(java.util.Collection attributes)
|
|
| Method Summary | |
void |
addAttribute(DataAttribute attribute)
Add a new attribute to the schema |
java.util.Collection |
attributes()
Get the collection of all attributes in this schema |
java.lang.String |
dataLabel()
dataLabel() provides the name used to identify the class in an external data source. |
boolean |
isPrimaryKey(java.lang.String key)
Determine if the specified key is a primary key |
java.util.Set |
keys()
|
java.util.Collection |
primaryKeys()
Get the collection of primary keys |
void |
update(DataAdaptor adaptor)
Update the data based on the information provided by the data provider. |
protected void |
validatePrimaryKeys()
|
void |
write(DataAdaptor adaptor)
Write data to the data adaptor for storage. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Map attributeTable
protected java.util.Collection primaryKeys
| Constructor Detail |
public DataTable.Schema()
public DataTable.Schema(java.util.Collection attributes)
throws MissingPrimaryKeyException
| Method Detail |
public java.util.Set keys()
protected void validatePrimaryKeys()
throws MissingPrimaryKeyException
MissingPrimaryKeyExceptionpublic java.util.Collection attributes()
public void addAttribute(DataAttribute attribute)
attribute - The attribute to add to the schemapublic java.util.Collection primaryKeys()
public boolean isPrimaryKey(java.lang.String key)
key - The key to test for being a primary key
public java.lang.String dataLabel()
DataListener
dataLabel in interface DataListener
public void update(DataAdaptor adaptor)
throws MissingPrimaryKeyException
DataListener
update in interface DataListeneradaptor - The adaptor from which to update the data
MissingPrimaryKeyException
public void write(DataAdaptor adaptor)
throws MissingPrimaryKeyException
DataListener
write in interface DataListeneradaptor - The adaptor to which the receiver's data is written
MissingPrimaryKeyException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||