/** * INTERNAL: * Clone the attribute from the clone and assign it to the backup. */ public void buildBackupClone(Object clone, Object backup, UnitOfWorkImpl unitOfWork) { Object attributeValue = getAttributeValueFromObject(clone); setAttributeValueInObject(backup, buildBackupClonePart(attributeValue, unitOfWork)); }
/** * INTERNAL: * Clone the attribute from the clone and assign it to the backup. */ public void buildBackupClone(Object clone, Object backup, UnitOfWorkImpl unitOfWork) { Object attributeValue = getAttributeValueFromObject(clone); setAttributeValueInObject(backup, buildBackupClonePart(attributeValue, unitOfWork)); }
/** * INTERNAL: * Clone the attribute from the clone and assign it to the backup. */ public void buildBackupClone(Object clone, Object backup, UnitOfWorkImpl unitOfWork) { Object attributeValue = getAttributeValueFromObject(clone); setAttributeValueInObject(backup, buildBackupClonePart(attributeValue, unitOfWork)); }
/** * Build and return a backup clone of the attribute. */ @Override protected Object buildBackupClonePart(Object attributeValue, UnitOfWorkImpl unitOfWork) { ContainerPolicy cp = this.getContainerPolicy(); if (attributeValue == null) { return cp.containerInstance(); } Object backupAttributeValue = cp.containerInstance(cp.sizeFor(attributeValue)); for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) { Object backupElement = super.buildBackupClonePart(cp.next(iter, unitOfWork), unitOfWork); cp.addInto(backupElement, backupAttributeValue, unitOfWork); } return backupAttributeValue; }
/** * Build and return a backup clone of the attribute. */ protected Object buildBackupClonePart(Object attributeValue, UnitOfWorkImpl unitOfWork) { ContainerPolicy cp = this.getContainerPolicy(); if (attributeValue == null) { return cp.containerInstance(); } Object backupAttributeValue = cp.containerInstance(cp.sizeFor(attributeValue)); for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) { Object backupElement = super.buildBackupClonePart(cp.next(iter, unitOfWork), unitOfWork); cp.addInto(backupElement, backupAttributeValue, unitOfWork); } return backupAttributeValue; }
/** * Build and return a backup clone of the attribute. */ @Override protected Object buildBackupClonePart(Object attributeValue, UnitOfWorkImpl unitOfWork) { ContainerPolicy cp = this.getContainerPolicy(); if (attributeValue == null) { return cp.containerInstance(); } Object backupAttributeValue = cp.containerInstance(cp.sizeFor(attributeValue)); for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) { Object backupElement = super.buildBackupClonePart(cp.next(iter, unitOfWork), unitOfWork); cp.addInto(backupElement, backupAttributeValue, unitOfWork); } return backupAttributeValue; }