/** * INTERNAL: * Return if this mapping supports change tracking. */ @Override public boolean isChangeTrackingSupported(Project project) { return !isMutable(); }
/** * INTERNAL: * Return if this mapping supports change tracking. */ public boolean isChangeTrackingSupported(Project project) { return !isMutable(); }
/** * INTERNAL: * Return if this mapping supports change tracking. */ @Override public boolean isChangeTrackingSupported(Project project) { return !isMutable(); }
/** * INTERNAL: * Clone the actual value represented by this mapping. Do set the cloned value into the object. * @param attributeValue * @param session * @return */ protected Object buildCloneValue(Object attributeValue, AbstractSession session) { Object newAttributeValue = attributeValue; if (isMutable() && attributeValue != null) { // EL Bug 252047 - Mutable attributes are not cloned when isMutable is enabled on a Direct Mapping if (attributeValue instanceof byte[]) { int length = ((byte[]) attributeValue).length; byte[] arrayCopy = new byte[length]; System.arraycopy(attributeValue, 0, arrayCopy, 0, length); newAttributeValue = arrayCopy; } else if (attributeValue instanceof Date) { newAttributeValue = ((Date)attributeValue).clone(); } else if (attributeValue instanceof Calendar) { newAttributeValue = ((Calendar)attributeValue).clone(); } else { newAttributeValue = getAttributeValue(getFieldValue(attributeValue, session), session); } } return newAttributeValue; }
if (isMutable() && attributeValue != null) {
if (isMutable() && attributeValue != null) {
/** * INTERNAL: * Return if this mapping requires its attribute value to be cloned. */ @Override public boolean isCloningRequired() { return isMutable() || getDescriptor().getCopyPolicy().buildsNewInstance(); }
/** * INTERNAL: * Return if this mapping requires its attribute value to be cloned. */ public boolean isCloningRequired() { return isMutable() || getDescriptor().getCopyPolicy().buildsNewInstance(); }
/** * INTERNAL: * Return if this mapping requires its attribute value to be cloned. */ @Override public boolean isCloningRequired() { return isMutable() || getDescriptor().getCopyPolicy().buildsNewInstance(); }