public DatabaseValueHolder createCloneTransformationValueHolder(ValueHolderInterface attributeValue, Object original, Object clone, AbstractTransformationMapping mapping) { return new ProtectedValueHolder(attributeValue, mapping, this); }
@Override protected Object instantiate() throws DatabaseException { if (this.session == null){ throw ValidationException.instantiatingValueholderWithNullSession(); } //no need for original or cachekey here as the relationship must be cacheable and present in // wrapped valueholder or the ProtectedValueHolder would not have been created. Integer refreshCascade = null; if (wrappedValueHolder instanceof QueryBasedValueHolder){ refreshCascade = ((QueryBasedValueHolder)getWrappedValueHolder()).getRefreshCascadePolicy(); } Object clone = mapping.buildCloneForPartObject(this.wrappedValueHolder.getValue(),null, null, null, this.session, refreshCascade, true, true); // Bug 414801 if (wrappedValueHolder.isInstantiated() && refreshCascade != null) { ((QueryBasedValueHolder)getWrappedValueHolder()).setRefreshCascadePolicy(null); } return clone; }
@Override protected Object instantiate() throws DatabaseException { if (this.session == null){ throw ValidationException.instantiatingValueholderWithNullSession(); } //no need for original or cachekey here as the relationship must be cacheable and present in // wrapped valueholder or the ProtectedValueHolder would not have been created. Integer refreshCascade = null; if (wrappedValueHolder instanceof QueryBasedValueHolder){ refreshCascade = ((QueryBasedValueHolder)getWrappedValueHolder()).getRefreshCascadePolicy(); } Object clone = mapping.buildCloneForPartObject(this.wrappedValueHolder.getValue(),null, null, null, this.session, refreshCascade, true, true); // Bug 414801 if (wrappedValueHolder.isInstantiated() && refreshCascade != null) { ((QueryBasedValueHolder)getWrappedValueHolder()).setRefreshCascadePolicy(null); } return clone; }
public DatabaseValueHolder createCloneQueryValueHolder(ValueHolderInterface attributeValue, Object clone, AbstractRecord row, ForeignReferenceMapping mapping) { return new ProtectedValueHolder(attributeValue, mapping, this); }
public DatabaseValueHolder createCloneTransformationValueHolder(ValueHolderInterface attributeValue, Object original, Object clone, AbstractTransformationMapping mapping) { return new ProtectedValueHolder(attributeValue, mapping, this); }
public DatabaseValueHolder createCloneQueryValueHolder(ValueHolderInterface attributeValue, Object clone, AbstractRecord row, ForeignReferenceMapping mapping) { return new ProtectedValueHolder(attributeValue, mapping, this); }