Package org.apache.cayenne.access.flush
Class DefaultDataDomainFlushAction
java.lang.Object
org.apache.cayenne.access.flush.DefaultDataDomainFlushAction
- All Implemented Interfaces:
- DataDomainFlushAction
Default implementation of 
DataDomainFlushAction.- Since:
- 4.2
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classprotected static class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final DataDomainprotected final DbRowOpSorterprotected final JdbcEventLoggerprotected final OperationObserver
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDefaultDataDomainFlushAction(DataDomain dataDomain, DbRowOpSorter dbRowOpSorter, JdbcEventLogger jdbcEventLogger) 
- 
Method SummaryModifier and TypeMethodDescriptioncreateDbRowOps(ObjectStore objectStore, ObjectStoreGraphDiff changes) Create ops based on incoming graph changescreateQueries(List<DbRowOp> dbRowOps) protected voidcreateReplacementIds(ObjectStore store, CompoundDiff afterCommitDiff, List<DbRowOp> dbRowOps) Set finalObjectIdfor persistent objectsprotected voidexecuteQueries(List<? extends Query> queries) Execute queries, grouping them by nodesflush(DataContext context, GraphDiff changes) mergeSameObjectIds(List<DbRowOp> dbRowOps) protected voidpostprocess(DataContext context, ObjectStoreGraphDiff changes, CompoundDiff afterCommitDiff, List<DbRowOp> dbRowOps) NotifyObjectStoreand it's data row cache about actual changes we performed.Sort all operationsprotected voidupdateObjectIds(Collection<DbRowOp> dbRowOps) Fill in replacement IDs' data for given operations
- 
Field Details- 
dataDomain
- 
dbRowOpSorter
- 
jdbcEventLogger
- 
observer
 
- 
- 
Constructor Details- 
DefaultDataDomainFlushActionprotected DefaultDataDomainFlushAction(DataDomain dataDomain, DbRowOpSorter dbRowOpSorter, JdbcEventLogger jdbcEventLogger) 
 
- 
- 
Method Details- 
flush- Specified by:
- flushin interface- DataDomainFlushAction
 
- 
createDbRowOpsCreate ops based on incoming graph changes- Parameters:
- objectStore- originating object store
- changes- object graph diff
- Returns:
- collection of DbRowOp
 
- 
updateObjectIdsFill in replacement IDs' data for given operations- Parameters:
- dbRowOps- collection of- DbRowOp
 
- 
mergeSameObjectIds- Parameters:
- dbRowOps- collection of- DbRowOp
- Returns:
- collection of ops with merged duplicates
 
- 
filterOps
- 
sortSort all operations- Parameters:
- dbRowOps- collection of- DbRowOp
- Returns:
- sorted collection of operations
- See Also:
 
- 
createQueries
- 
executeQueriesExecute queries, grouping them by nodes- Parameters:
- queries- to execute
 
- 
createReplacementIdsprotected void createReplacementIds(ObjectStore store, CompoundDiff afterCommitDiff, List<DbRowOp> dbRowOps) Set finalObjectIdfor persistent objects- Parameters:
- store- object store
- afterCommitDiff- result graph diff
- dbRowOps- collection of- DbRowOp
 
- 
postprocessprotected void postprocess(DataContext context, ObjectStoreGraphDiff changes, CompoundDiff afterCommitDiff, List<DbRowOp> dbRowOps) NotifyObjectStoreand it's data row cache about actual changes we performed.- Parameters:
- context- originating context
- changes- incoming diff
- afterCommitDiff- resulting diff
- dbRowOps- collection of- DbRowOp
 
 
-