relationInsertQuery.add(flattenedSnapshot);
}
void addFlattenedDelete(DbEntity flattenedEntity, FlattenedArcKey flattenedDeleteInfo) {
DeleteBatchQuery relationDeleteQuery = (DeleteBatchQuery) flattenedDeleteQueries
.get(flattenedEntity);
if (relationDeleteQuery == null) {
boolean optimisticLocking = false;
relationDeleteQuery = new DeleteBatchQuery(flattenedEntity, 50);
relationDeleteQuery.setUsingOptimisticLocking(optimisticLocking);
flattenedDeleteQueries.put(flattenedEntity, relationDeleteQuery);
}
DataNode node = parent.getDomain().lookupDataNode(flattenedEntity.getDataMap());
List flattenedSnapshots = flattenedDeleteInfo.buildJoinSnapshotsForDelete(node);
if (!flattenedSnapshots.isEmpty()) {
Iterator snapsIt = flattenedSnapshots.iterator();
while (snapsIt.hasNext()) {
relationDeleteQuery.add((Map) snapsIt.next());
}
}
}