/** * INTERNAL: * Clone the attribute from the original and assign it to the clone. */ @Override public void buildClone(Object original, CacheKey cacheKey, Object clone, Integer refreshCascade, AbstractSession cloningSession) { Object attributeValue = this.getAttributeValueFromObject(original); this.setAttributeValueInObject(clone, this.buildClonePart(attributeValue, cacheKey, cloningSession)); }
/** * INTERNAL: * Clone the attribute from the original and assign it to the clone. */ @Override public void buildClone(Object original, CacheKey cacheKey, Object clone, Integer refreshCascade, AbstractSession cloningSession) { Object attributeValue = this.getAttributeValueFromObject(original); this.setAttributeValueInObject(clone, this.buildClonePart(attributeValue, cacheKey, cloningSession)); }
/** * INTERNAL: * Clone the attribute from the original and assign it to the clone. */ public void buildClone(Object original, Object clone, UnitOfWorkImpl unitOfWork) { Object attributeValue = this.getAttributeValueFromObject(original); this.setAttributeValueInObject(clone, this.buildClonePart(attributeValue, unitOfWork)); }
/** * 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); if (attributeValue == null) { attributeValue = getContainerPolicy().containerInstance(); } else { attributeValue = getContainerPolicy().cloneFor(attributeValue); } setAttributeValueInObject(copy, attributeValue); }
/** * 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); if (attributeValue == null) { attributeValue = getContainerPolicy().containerInstance(); } else { attributeValue = getContainerPolicy().cloneFor(attributeValue); } setAttributeValueInObject(copy, attributeValue); }
/** * 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); if (attributeValue == null) { attributeValue = getContainerPolicy().containerInstance(); } else { attributeValue = getContainerPolicy().cloneFor(attributeValue); } setAttributeValueInObject(copy, attributeValue); }
wasCacheUsed[0] = Boolean.TRUE; Object attributeValue = this.getAttributeValueFromObject(cached); return buildClonePart(attributeValue, cacheKey, executionSession); return getAttributeValueFromObject(row.getSopObject());
wasCacheUsed[0] = Boolean.TRUE; Object attributeValue = this.getAttributeValueFromObject(cached); return buildClonePart(attributeValue, cacheKey, executionSession); return getAttributeValueFromObject(row.getSopObject());
Object backUpAttribute = null; cloneAttribute = getAttributeValueFromObject(clone); backUpAttribute = getAttributeValueFromObject(backup); if ((backUpAttribute == null) && (cloneAttribute == null)) { return null;
/** * INTERNAL: * Iterate on the appropriate attribute value. */ public void iterate(DescriptorIterator iterator) { // PERF: Only iterate when required. if (iterator.shouldIterateOnPrimitives()) { Object attributeValue = this.getAttributeValueFromObject(iterator.getVisitedParent()); if (attributeValue == null) { return; } ContainerPolicy cp = this.getContainerPolicy(); for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) { iterator.iteratePrimitiveForMapping(cp.next(iter, iterator.getSession()), this); } } }
/** * INTERNAL: * Iterate on the appropriate attribute value. */ public void iterate(DescriptorIterator iterator) { // PERF: Only iterate when required. if (iterator.shouldIterateOnPrimitives()) { Object attributeValue = this.getAttributeValueFromObject(iterator.getVisitedParent()); if (attributeValue == null) { return; } ContainerPolicy cp = this.getContainerPolicy(); for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) { iterator.iteratePrimitiveForMapping(cp.next(iter, iterator.getSession()), this); } } }
/** * INTERNAL: * Iterate on the appropriate attribute value. */ public void iterate(DescriptorIterator iterator) { // PERF: Only iterate when required. if (iterator.shouldIterateOnPrimitives()) { Object attributeValue = this.getAttributeValueFromObject(iterator.getVisitedParent()); if (attributeValue == null) { return; } ContainerPolicy cp = this.getContainerPolicy(); for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) { iterator.iteratePrimitiveForMapping(cp.next(iter, iterator.getSession()), this); } } }
/** * INTERNAL: * Merge changes from the source to the target object. This merge is only called when a changeSet for the target * does not exist or the target is uninitialized. * Treat the collection as a simple direct value. */ public void mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, MergeManager mergeManager) { Object attributeValue = getAttributeValueFromObject(source); ContainerPolicy cp = this.getContainerPolicy(); Object container = cp.containerInstance(); Object iter = cp.iteratorFor(attributeValue); while (cp.hasNext(iter)) { cp.addInto(cp.next(iter, mergeManager.getSession()), container, mergeManager.getSession()); } setAttributeValueInObject(target, container); }
Object attributeValue = this.getAttributeValueFromObject(object); if (attributeValue == null) { row.put(this.getField(), null);
Object attributeValue = this.getAttributeValueFromObject(object); if (attributeValue == null) { row.put(this.getField(), null);
Object attributeValue = this.getAttributeValueFromObject(object); if (attributeValue == null) { row.put(this.getField(), null);