public class DistributedGraphWriter extends WriterSupport implements DistributedWriter
Acts as a container for one or more TableWriter elements
encapsulating a set of component table write operations for federation across
multiple tables, or a single table in the most simple (degenerate) case.
GraphTableWriter,
GraphTablemappingContext, rowWriterMap| Constructor and Description |
|---|
DistributedGraphWriter(commonj.sdo.DataGraph dataGraph,
TableWriterCollector collector,
Connection connection,
StoreMappingContext mappingContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTableWriter(TableWriter writer)
Adds the given table writer to the container
|
void |
close()
Closes tables and connections.
|
RowWriter |
createRowWriter(commonj.sdo.DataObject dataObject)
Creates and returns a new row writer associated with the given data object.
|
RowWriter |
findRowWriter(commonj.sdo.DataObject dataObject)
Returns the row writer associated with the given data object or null if no
row writer is associated.
|
Connection |
getConnection()
returns the shared connection for the operation
|
StoreMappingContext |
getMappingContext() |
TableWriter |
getRootTableWriter()
Returns the table writer associated with the data graph root.
|
RowWriter |
getRowWriter(commonj.sdo.DataObject dataObject)
Returns the row writer associated with the given data object
|
TableWriter |
getTableWriter(String tableName)
Returns the table writer for the given configured table name, or null of
not exists.
|
int |
getTableWriterCount()
Returns the count of table writers for this container.
|
List<TableWriter> |
getTableWriters()
Returns all table writers for the this container
|
List<commonj.sdo.Type> |
getTypes(TableWriter operation)
Returns a list of types associated with the given table operation.
|
boolean |
hasSingleRootType()
Returns true if only one table operation exists with only one associated
(root) type for this operation.
|
void |
setRootTableWriter(TableWriter writer)
Sets the table writer associated with the data graph root.
|
addRowWriter, createRowWriter, createRowWriter, findContainerRowWriter, getContainerAncestry, getContainerRowWriterpublic DistributedGraphWriter(commonj.sdo.DataGraph dataGraph,
TableWriterCollector collector,
Connection connection,
StoreMappingContext mappingContext)
throws IOException
IOExceptionpublic TableWriter getTableWriter(String tableName)
getTableWriter in interface DistributedWritertableName - the name of the configured table.public void addTableWriter(TableWriter writer)
addTableWriter in interface DistributedWriterwriter - the table writer.public int getTableWriterCount()
getTableWriterCount in interface DistributedWriterpublic List<TableWriter> getTableWriters()
getTableWriters in interface DistributedWriterpublic TableWriter getRootTableWriter()
getRootTableWriter in interface DistributedWriterpublic void setRootTableWriter(TableWriter writer)
setRootTableWriter in interface DistributedWriterwriter - the table writerpublic RowWriter getRowWriter(commonj.sdo.DataObject dataObject)
getRowWriter in interface DistributedWriterdataObject - the data objectIllegalArgumentException - if the given data object is not associated with any row writer.public RowWriter findRowWriter(commonj.sdo.DataObject dataObject)
findRowWriter in interface DistributedWriterdataObject - the data objectpublic RowWriter createRowWriter(commonj.sdo.DataObject dataObject) throws IOException
createRowWriter in interface DistributedWriterdataObject - the data objectIOExceptionIllegalArgumentException - if the given data object is already associated with a row writer.public boolean hasSingleRootType()
hasSingleRootType in interface DistributedGraphOperationpublic List<commonj.sdo.Type> getTypes(TableWriter operation)
getTypes in interface DistributedWriterreader - the table operationpublic Connection getConnection()
DistributedGraphOperationgetConnection in interface DistributedGraphOperationpublic void close()
DistributedGraphOperationclose in interface DistributedGraphOperationpublic StoreMappingContext getMappingContext()
getMappingContext in interface DistributedGraphOperationCopyright © 2021. All Rights Reserved.