use of com.qcadoo.model.internal.utils.EntitySignature in project qcadoo by qcadoo.
the class DataAccessServiceImpl method performCascadeDelete.
private EntityOpResult performCascadeDelete(final InternalDataDefinition childDataDefinition, final Collection<Entity> children, final boolean testOnly, final Set<EntitySignature> traversedEntities) {
for (Entity child : children) {
EntitySignature childSignature = EntitySignature.of(child);
if (!traversedEntities.contains(childSignature)) {
traversedEntities.add(childSignature);
EntityOpResult result = deleteEntity(childDataDefinition, child.getId(), testOnly, traversedEntities);
if (!result.isSuccessfull()) {
return result;
}
}
}
return EntityOpResult.successfull();
}
Aggregations