/** * INTERNAL: * Build back up clone. Used if clone is new because listener should not be set. */ public Object buildBackupClone(Object clone, ObjectBuilder builder, UnitOfWorkImpl uow) { return builder.buildBackupClone(clone, uow); }
/** * INTERNAL: * Build and return a backup clone of the attribute. */ protected Object buildBackupClonePart(Object attributeValue, UnitOfWorkImpl unitOfWork) { if (attributeValue == null) { return null; } return getObjectBuilder(attributeValue, unitOfWork).buildBackupClone(attributeValue, unitOfWork); }
/** * INTERNAL: * Clone the aggregate collection, if necessary. */ protected Object buildElementBackupClone(Object element, UnitOfWorkImpl unitOfWork) { // Do not clone for read-only. if (unitOfWork.isClassReadOnly(element.getClass())) { return element; } ClassDescriptor aggregateDescriptor = getReferenceDescriptor(element.getClass(), unitOfWork); Object clonedElement = aggregateDescriptor.getObjectBuilder().buildBackupClone(element, unitOfWork); return clonedElement; }