public class DefaultDataDomainFlushAction extends Object implements DataDomainFlushAction
DataDomainFlushAction
.Modifier and Type | Class and Description |
---|---|
protected static class |
DefaultDataDomainFlushAction.PhantomDbRowOpCleaner |
Modifier and Type | Field and Description |
---|---|
protected DataDomain |
dataDomain |
protected DbRowOpSorter |
dbRowOpSorter |
protected JdbcEventLogger |
jdbcEventLogger |
protected OperationObserver |
observer |
Modifier | Constructor and Description |
---|---|
protected |
DefaultDataDomainFlushAction(DataDomain dataDomain,
DbRowOpSorter dbRowOpSorter,
JdbcEventLogger jdbcEventLogger) |
Modifier and Type | Method and Description |
---|---|
protected List<DbRowOp> |
createDbRowOps(ObjectStore objectStore,
ObjectStoreGraphDiff changes)
Create ops based on incoming graph changes
|
protected List<? extends Query> |
createQueries(List<DbRowOp> dbRowOps) |
protected void |
createReplacementIds(ObjectStore store,
CompoundDiff afterCommitDiff,
List<DbRowOp> dbRowOps)
Set final
ObjectId for persistent objects |
protected void |
executeQueries(List<? extends Query> queries)
Execute queries, grouping them by nodes
|
protected List<DbRowOp> |
filterOps(List<DbRowOp> dbRowOps) |
GraphDiff |
flush(DataContext context,
GraphDiff changes) |
protected List<DbRowOp> |
mergeSameObjectIds(List<DbRowOp> dbRowOps) |
protected void |
postprocess(DataContext context,
ObjectStoreGraphDiff changes,
CompoundDiff afterCommitDiff,
List<DbRowOp> dbRowOps)
Notify
ObjectStore and it's data row cache about actual changes we performed. |
protected List<DbRowOp> |
sort(List<DbRowOp> dbRowOps)
Sort all operations
|
protected void |
updateObjectIds(Collection<DbRowOp> dbRowOps)
Fill in replacement IDs' data for given operations
|
protected final DataDomain dataDomain
protected final DbRowOpSorter dbRowOpSorter
protected final JdbcEventLogger jdbcEventLogger
protected final OperationObserver observer
protected DefaultDataDomainFlushAction(DataDomain dataDomain, DbRowOpSorter dbRowOpSorter, JdbcEventLogger jdbcEventLogger)
public GraphDiff flush(DataContext context, GraphDiff changes)
flush
in interface DataDomainFlushAction
protected List<DbRowOp> createDbRowOps(ObjectStore objectStore, ObjectStoreGraphDiff changes)
objectStore
- originating object storechanges
- object graph diffDbRowOp
protected void updateObjectIds(Collection<DbRowOp> dbRowOps)
dbRowOps
- collection of DbRowOp
protected List<DbRowOp> mergeSameObjectIds(List<DbRowOp> dbRowOps)
dbRowOps
- collection of DbRowOp
protected List<DbRowOp> sort(List<DbRowOp> dbRowOps)
dbRowOps
- collection of DbRowOp
interface and it's default implementation
protected void executeQueries(List<? extends Query> queries)
queries
- to executeprotected void createReplacementIds(ObjectStore store, CompoundDiff afterCommitDiff, List<DbRowOp> dbRowOps)
ObjectId
for persistent objectsstore
- object storeafterCommitDiff
- result graph diffdbRowOps
- collection of DbRowOp
protected void postprocess(DataContext context, ObjectStoreGraphDiff changes, CompoundDiff afterCommitDiff, List<DbRowOp> dbRowOps)
ObjectStore
and it's data row cache about actual changes we performed.context
- originating contextchanges
- incoming diffafterCommitDiff
- resulting diffdbRowOps
- collection of DbRowOp
Copyright © 2001–2021 Apache Cayenne. All rights reserved.