public class EditContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GROUP_TAG
tag for a table group within a data adaptor
|
protected MessageCenter |
MESSAGE_CENTER
message center for dispatching events from this edit context
|
protected EditContextListener |
NOTICE_PROXY
proxy which forwards events from this edit context
|
Constructor and Description |
---|
EditContext()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addEditContextListener(EditContextListener listener)
Add the listener to receive edit context events.
|
void |
addTablesToGroup(java.util.Collection<DataTable> newTables,
java.lang.String group)
Add the tables to the edit context.
|
void |
addTableToGroup(DataTable newTable,
java.lang.String group)
Add the table to the edit context.
|
void |
clear() |
DataTable |
getTable(java.lang.String name)
Get the table associated with the specified table name.
|
java.util.Collection<java.lang.String> |
getTableGroups()
Get all table groups
|
java.util.Collection<java.lang.String> |
getTableNames()
Get the collection of all table names associated with this context.
|
java.util.Collection<DataTable> |
getTables()
Get the collection of all tables in the edit context.
|
java.util.Collection<DataTable> |
getTablesForGroup(java.lang.String group)
Get all tables associated with the specified group
|
void |
importTablesFromContext(EditContext editContext,
java.lang.String group)
Perform a deep copy of the specified table group from the specified edit context
|
void |
importTablesFromDataAdaptor(DataAdaptor docAdaptor,
java.lang.String tableGroup)
Import the tables from the data adaptor and assign them to the specified group in this edit context.
|
GenericRecord |
recordForNode(java.lang.String tableName,
java.lang.String nodeId)
Get a single record from the table associated with the node.
|
<ValueType> |
records(DataTable table,
java.util.Map<java.lang.String,ValueType> bindings)
Get the records from the table where the bindings map is valid.
|
java.util.Collection<GenericRecord> |
records(java.lang.String tableName)
Get all of the records from the table given by the table name.
|
<ValueType> |
records(java.lang.String tableName,
java.util.Map<java.lang.String,ValueType> bindings)
Get the records from the table where the bindings map is valid.
|
java.util.Collection<GenericRecord> |
records(java.lang.String tableName,
java.lang.String key,
java.lang.Object value)
Get the records from the table where the value for the specified key matches.
|
java.util.Collection<GenericRecord> |
recordsForNode(java.lang.String tableName,
java.lang.String nodeId)
Get the records from the table associated with the node.
|
void |
remove(DataTable aTable)
Remove the table from the edit context.
|
void |
removeEditContextListener(EditContextListener listener)
Remove the listener from receiving edit context events.
|
void |
writeGroupToDataAdaptor(DataAdaptor docAdaptor,
java.lang.String group)
Write all tables associated with the specified group to the specified data adaptor.
|
public static final java.lang.String GROUP_TAG
protected final MessageCenter MESSAGE_CENTER
protected final EditContextListener NOTICE_PROXY
public void addEditContextListener(EditContextListener listener)
listener
- the listener to receive edit context events from this contextpublic void removeEditContextListener(EditContextListener listener)
listener
- the listener to remove from receving edit context events from this contextpublic void importTablesFromContext(EditContext editContext, java.lang.String group)
public void importTablesFromDataAdaptor(DataAdaptor docAdaptor, java.lang.String tableGroup)
public void writeGroupToDataAdaptor(DataAdaptor docAdaptor, java.lang.String group)
public void clear()
public DataTable getTable(java.lang.String name)
public java.util.Collection<java.lang.String> getTableNames()
public java.util.Collection<DataTable> getTables()
public void addTableToGroup(DataTable newTable, java.lang.String group)
public void addTablesToGroup(java.util.Collection<DataTable> newTables, java.lang.String group)
public java.util.Collection<java.lang.String> getTableGroups()
public java.util.Collection<DataTable> getTablesForGroup(java.lang.String group)
public void remove(DataTable aTable)
public java.util.Collection<GenericRecord> records(java.lang.String tableName)
public <ValueType> java.util.Collection<GenericRecord> records(java.lang.String tableName, java.util.Map<java.lang.String,ValueType> bindings)
public <ValueType> java.util.Collection<GenericRecord> records(DataTable table, java.util.Map<java.lang.String,ValueType> bindings)
public java.util.Collection<GenericRecord> records(java.lang.String tableName, java.lang.String key, java.lang.Object value)
public java.util.Collection<GenericRecord> recordsForNode(java.lang.String tableName, java.lang.String nodeId)
public GenericRecord recordForNode(java.lang.String tableName, java.lang.String nodeId)