/** * INTERNAL: * Copy of the attribute of the object. * This is NOT used for unit of work but for templatizing an object. */ @Override public void buildCopy(Object copy, Object original, CopyGroup group) { Object attributeValue = getAttributeValueFromObject(original); setAttributeValueInObject(copy, buildCopyOfAttributeValue(attributeValue, group)); }
/** * INTERNAL: * Copy of the attribute of the object. * This is NOT used for unit of work but for templatizing an object. */ @Override public void buildCopy(Object copy, Object original, CopyGroup group) { Object attributeValue = getAttributeValueFromObject(original); setAttributeValueInObject(copy, buildCopyOfAttributeValue(attributeValue, group)); }
/** * INTERNAL: * Copy of the attribute of the object. * This is NOT used for unit of work but for templatizing an object. */ public void buildCopy(Object copy, Object original, ObjectCopyingPolicy policy) { Object attributeValue = getAttributeValueFromObject(original); setAttributeValueInObject(copy, buildCopyOfAttributeValue(attributeValue, policy)); }
/** * Copy of the attribute of the object. * This is NOT used for unit of work but for templatizing an object. */ protected Object buildCopyOfAttributeValue(Object attributeValue, ObjectCopyingPolicy policy) { ContainerPolicy cp = this.getContainerPolicy(); if (attributeValue == null) { return cp.containerInstance(); } Object attributeValueCopy = cp.containerInstance(cp.sizeFor(attributeValue)); for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) { Object copyElement = super.buildCopyOfAttributeValue(cp.next(iter, policy.getSession()), policy); cp.addInto(copyElement, attributeValueCopy, policy.getSession()); } return attributeValueCopy; }
/** * Copy of the attribute of the object. * This is NOT used for unit of work but for templatizing an object. */ @Override protected Object buildCopyOfAttributeValue(Object attributeValue, CopyGroup group) { ContainerPolicy cp = this.getContainerPolicy(); if (attributeValue == null) { return cp.containerInstance(); } Object attributeValueCopy = cp.containerInstance(cp.sizeFor(attributeValue)); for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) { Object copyElement = super.buildCopyOfAttributeValue(cp.next(iter, group.getSession()), group); cp.addInto(copyElement, attributeValueCopy, group.getSession()); } return attributeValueCopy; }
/** * Copy of the attribute of the object. * This is NOT used for unit of work but for templatizing an object. */ @Override protected Object buildCopyOfAttributeValue(Object attributeValue, CopyGroup group) { ContainerPolicy cp = this.getContainerPolicy(); if (attributeValue == null) { return cp.containerInstance(); } Object attributeValueCopy = cp.containerInstance(cp.sizeFor(attributeValue)); for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) { Object copyElement = super.buildCopyOfAttributeValue(cp.next(iter, group.getSession()), group); cp.addInto(copyElement, attributeValueCopy, group.getSession()); } return attributeValueCopy; }