@Override
void appendQueriesInternal(Collection<Query> queries) {
DataNodeSyncQualifierDescriptor qualifierBuilder = new DataNodeSyncQualifierDescriptor();
EntitySorter sorter = parent.getDomain().getEntitySorter();
sorter.sortDbEntities(dbEntities, true);
for (DbEntity dbEntity : dbEntities) {
Collection<DbEntityClassDescriptor> descriptors = descriptorsByDbEntity
.get(dbEntity);
Map<Object, Query> batches = new LinkedHashMap<Object, Query>();
for (DbEntityClassDescriptor descriptor : descriptors) {
qualifierBuilder.reset(descriptor);
boolean isRootDbEntity = descriptor.isMaster();
// remove object set for dependent entity, so that it does not show up
// on post processing
List<Persistent> objects = objectsByDescriptor.get(descriptor
.getClassDescriptor());
if (objects.isEmpty()) {
continue;
}
checkReadOnly(descriptor.getEntity());
if (isRootDbEntity) {
sorter.sortObjectsForEntity(descriptor.getEntity(), objects, true);
}
for (Persistent o : objects) {
ObjectDiff diff = parent.objectDiff(o.getObjectId());