|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.db.entitymanager.operation.DbOperationManager
public class DbOperationManager
Manages a set of database operations.
| Field Summary | |
|---|---|
static Comparator<DbBulkOperation> |
BULK_OPERATION_COMPARATOR
|
SortedMap<Class<?>,SortedSet<DbBulkOperation>> |
bulkOperations
bulk modifications (DELETE, UPDATE) on an entity collection |
LinkedHashSet<DbBulkOperation> |
bulkOperationsInsertionOrder
bulk modifications (DELETE, UPDATE) for which order of execution is important |
SortedMap<Class<?>,SortedSet<DbEntityOperation>> |
deletes
DELETEs of a single entity |
static Comparator<DbEntityOperation> |
INSERT_OPERATION_COMPARATOR
|
static Comparator<Class<?>> |
INSERT_TYPE_COMPARATOR
|
SortedMap<Class<?>,SortedSet<DbEntityOperation>> |
inserts
INSERTs |
static Comparator<DbEntityOperation> |
MODIFICATION_OPERATION_COMPARATOR
|
static Comparator<Class<?>> |
MODIFICATION_TYPE_COMPARATOR
|
SortedMap<Class<?>,SortedSet<DbEntityOperation>> |
updates
UPDATEs of a single entity |
| Constructor Summary | |
|---|---|
DbOperationManager()
|
|
| Method Summary | |
|---|---|
boolean |
addOperation(DbBulkOperation newOperation)
|
boolean |
addOperation(DbEntityOperation newOperation)
|
boolean |
addOperationPreserveOrder(DbBulkOperation newOperation)
|
protected void |
addSortedInserts(List<DbOperation> flush)
Adds the insert operations to the flush (in correct order). |
protected void |
addSortedModifications(List<DbOperation> flush)
Adds a correctly ordered list of UPDATE and DELETE operations to the flush. |
protected void |
addSortedModificationsForType(Class<?> type,
SortedSet<DbEntityOperation> preSortedOperations,
List<DbOperation> flush)
|
List<DbOperation> |
calculateFlush()
|
protected SortedSet<DbEntityOperation> |
getDeletesByType(Class<? extends DbEntity> type,
boolean create)
|
protected SortedSet<DbEntityOperation> |
getInsertsForType(Class<? extends DbEntity> type,
boolean create)
|
protected SortedSet<DbEntityOperation> |
getUpdatesByType(Class<? extends DbEntity> type,
boolean create)
|
protected List<DbEntityOperation> |
sortByReferences(SortedSet<DbEntityOperation> preSorted)
Assumptions: a) all operations in the set work on entities such that the entities implement HasDbReferences. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Comparator<Class<?>> INSERT_TYPE_COMPARATOR
public static Comparator<Class<?>> MODIFICATION_TYPE_COMPARATOR
public static Comparator<DbEntityOperation> INSERT_OPERATION_COMPARATOR
public static Comparator<DbEntityOperation> MODIFICATION_OPERATION_COMPARATOR
public static Comparator<DbBulkOperation> BULK_OPERATION_COMPARATOR
public SortedMap<Class<?>,SortedSet<DbEntityOperation>> inserts
public SortedMap<Class<?>,SortedSet<DbEntityOperation>> updates
public SortedMap<Class<?>,SortedSet<DbEntityOperation>> deletes
public SortedMap<Class<?>,SortedSet<DbBulkOperation>> bulkOperations
public LinkedHashSet<DbBulkOperation> bulkOperationsInsertionOrder
| Constructor Detail |
|---|
public DbOperationManager()
| Method Detail |
|---|
public boolean addOperation(DbEntityOperation newOperation)
protected SortedSet<DbEntityOperation> getDeletesByType(Class<? extends DbEntity> type,
boolean create)
protected SortedSet<DbEntityOperation> getUpdatesByType(Class<? extends DbEntity> type,
boolean create)
protected SortedSet<DbEntityOperation> getInsertsForType(Class<? extends DbEntity> type,
boolean create)
public boolean addOperation(DbBulkOperation newOperation)
public boolean addOperationPreserveOrder(DbBulkOperation newOperation)
public List<DbOperation> calculateFlush()
protected void addSortedInserts(List<DbOperation> flush)
operationsForFlush - protected void addSortedModifications(List<DbOperation> flush)
flush -
protected void addSortedModificationsForType(Class<?> type,
SortedSet<DbEntityOperation> preSortedOperations,
List<DbOperation> flush)
protected List<DbEntityOperation> sortByReferences(SortedSet<DbEntityOperation> preSorted)
HasDbReferences.
b) all operations in the set work on the same type (ie. all operations are INSERTs or DELETEs).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||