public interface DataManager
Modifier and Type | Method and Description |
---|---|
void |
addData(DataNode n)
Manually add a created DataNode to the DataManager for writing.
|
void |
addData(java.lang.String schema,
java.util.Map<java.lang.String,java.lang.Object> data)
Add data to to the table represented by schema.
|
void |
addData(java.lang.String schema,
java.lang.String columnName,
java.lang.Object value)
Add data from the session variables to the table.
|
DataManagerEventListener |
addEventListener(java.lang.String schema,
DataManagerEventSource.EventFireTime when,
DataManagerEventListener listener)
Add an even listener.
|
DataManagerEventListener |
addEventListenerWithPriority(java.lang.String schema,
DataManagerEventSource.EventFireTime when,
DataManagerEventListener listener,
int priority)
Add an event listener with a specified execution priority
|
void |
buildSchemas()
Builds the schemas from a database.
|
boolean |
checkDataNode(java.lang.String schema)
verifies that the data is ready to be inserted.
|
void |
clearAllData()
clears out all the nodes of the DataManager.
|
void |
clearData(java.lang.String schema)
Clear out all the uncommitted data for the given schema
|
void |
close()
close should be called when you are done with the DataManager
|
boolean |
commit(java.lang.String schema)
commits the row of data corresponding to the schema, so the next time addData is called it will be in a new row.
|
boolean |
flush()
writes the current data to the Database and clears out all the data.
|
java.util.Set<java.lang.String> |
getColumns(java.lang.String schema)
Retrieve the columns for a given schema
|
DataNode |
getCurrentDataNode(java.lang.String schema)
retrieves the current DataNode that is in scope for the schema
|
DatabaseSchema |
getDatabaseSchema()
Retrieve Database schema, for a Relational Database this contains all the information about the tables
|
DataNode |
getNewDataNode(java.lang.String schema)
Returns a new data node from the provided schema identifier.
|
RootNode |
getRoot()
returns the root node of the DataNode tree.
|
RelationalSchema |
getSchema(java.lang.String schema)
returns a schema with the given identifier
|
boolean |
hasSchema(java.lang.String schema)
returns whether or not th
|
DataManager |
setDatabaseSchema(DatabaseSchema s)
Manually set the DatabaseSchema.
|
void buildSchemas()
@NotNull @InternalOnly java.util.Set<java.lang.String> getColumns(java.lang.String schema)
schema
- The schema to get columns for@NotNull RelationalSchema getSchema(java.lang.String schema)
schema
- The name of the schemaboolean hasSchema(java.lang.String schema)
schema
- The schema to check forvoid addData(java.lang.String schema, java.util.Map<java.lang.String,java.lang.Object> data)
schema
- The name of the schema, or tabledata
- The data to addvoid addData(java.lang.String schema, java.lang.String columnName, java.lang.Object value)
schema
- The name of the schema, or tablecolumnName
- The name of the column in the databasevalue
- The value to addboolean commit(java.lang.String schema)
schema
- The name of the schema to commit@InternalOnly boolean checkDataNode(java.lang.String schema)
schema
- The name of the schemaDataNode getCurrentDataNode(java.lang.String schema)
schema
- The name of the schema@NotNull DataNode getNewDataNode(java.lang.String schema)
schema
- The name of the schemavoid addData(DataNode n)
n
- The node to addvoid clearData(java.lang.String schema)
schema
- The name of the schemavoid clearAllData()
@NotNull DataManagerEventListener addEventListener(java.lang.String schema, DataManagerEventSource.EventFireTime when, DataManagerEventListener listener)
schema
- The schema the event will be added forwhen
- The time the event should firelistener
- The listener that will handle the event@NotNull DataManagerEventListener addEventListenerWithPriority(java.lang.String schema, DataManagerEventSource.EventFireTime when, DataManagerEventListener listener, int priority)
schema
- The schema the event will be added forwhen
- The time when the event should firelistener
- The listener that will handle the eventpriority
- The priority for the event, with lower numbers being higher priority@NotNull DataManager setDatabaseSchema(DatabaseSchema s)
s
- The schema to set@Nullable DatabaseSchema getDatabaseSchema()
boolean flush()
@InternalOnly RootNode getRoot()
void close()