Package xal.tools.data
Class EditContext
java.lang.Object
xal.tools.data.EditContext
EditContext manages dynamic data held in all associated tables.
- Author:
- tap
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
tag for a table group within a data adaptorprotected final MessageCenter
message center for dispatching events from this edit contextprotected final EditContextListener
proxy which forwards events from this edit context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEditContextListener
(EditContextListener listener) Add the listener to receive edit context events.void
addTablesToGroup
(Collection<DataTable> newTables, String group) Add the tables to the edit context.void
addTableToGroup
(DataTable newTable, String group) Add the table to the edit context.void
clear()
Get the table associated with the specified table name.Get all table groupsGet the collection of all table names associated with this context.Get the collection of all tables in the edit context.getTablesForGroup
(String group) Get all tables associated with the specified groupvoid
importTablesFromContext
(EditContext editContext, String group) Perform a deep copy of the specified table group from the specified edit contextvoid
importTablesFromDataAdaptor
(DataAdaptor docAdaptor, String tableGroup) Import the tables from the data adaptor and assign them to the specified group in this edit context.recordForNode
(String tableName, String nodeId) Get a single record from the table associated with the node.Get all of the records from the table given by the table name.Get the records from the table where the value for the specified key matches.<T> Collection<GenericRecord>
Get the records from the table where the bindings map is valid.<T> Collection<GenericRecord>
Get the records from the table where the bindings map is valid.recordsForNode
(String tableName, String nodeId) Get the records from the table associated with the node.void
Remove the table from the edit context.void
removeEditContextListener
(EditContextListener listener) Remove the listener from receiving edit context events.void
writeGroupToDataAdaptor
(DataAdaptor docAdaptor, String group) Write all tables associated with the specified group to the specified data adaptor.
-
Field Details
-
GROUP_TAG
tag for a table group within a data adaptor- See Also:
-
messageCenter
message center for dispatching events from this edit context -
noticeProxy
proxy which forwards events from this edit context
-
-
Constructor Details
-
EditContext
public EditContext()Constructor
-
-
Method Details
-
addEditContextListener
Add the listener to receive edit context events.- Parameters:
listener
- the listener to receive edit context events from this context
-
removeEditContextListener
Remove the listener from receiving edit context events.- Parameters:
listener
- the listener to remove from receving edit context events from this context
-
importTablesFromContext
Perform a deep copy of the specified table group from the specified edit context -
importTablesFromDataAdaptor
Import the tables from the data adaptor and assign them to the specified group in this edit context. -
writeGroupToDataAdaptor
Write all tables associated with the specified group to the specified data adaptor. -
clear
public void clear() -
getTable
Get the table associated with the specified table name. -
getTableNames
Get the collection of all table names associated with this context. -
getTables
Get the collection of all tables in the edit context. -
addTableToGroup
Add the table to the edit context. -
addTablesToGroup
Add the tables to the edit context. -
getTableGroups
Get all table groups -
getTablesForGroup
Get all tables associated with the specified group -
remove
Remove the table from the edit context. -
records
Get all of the records from the table given by the table name. -
records
Get the records from the table where the bindings map is valid. -
records
Get the records from the table where the bindings map is valid. -
records
Get the records from the table where the value for the specified key matches. -
recordsForNode
Get the records from the table associated with the node. -
recordForNode
Get a single record from the table associated with the node.
-