/** * INTERNAL: * Set the value of the attribute mapped by this mapping, * placing it inside a value holder if necessary. * If the value holder is not instantiated then it is instantiated. */ @Override public void setRealAttributeValueInObject(Object object, Object value) throws DescriptorException { this.indirectionPolicy.setRealAttributeValueInObject(object, value); }
/** * INTERNAL: * Same functionality as setRealAttributeValueInObject(Object target, Object attributeValue) but allows * overridden behavior for IndirectionPolicies that track changes * @param target * @param attributeValue * @param allowChangeTracking */ public void setRealAttributeValueInObject(Object target, Object attributeValue, boolean allowChangeTracking) { setRealAttributeValueInObject(target, attributeValue); }
/** * INTERNAL: * Same functionality as setRealAttributeValueInObject(Object target, Object attributeValue) but allows * overridden behavior for IndirectionPolicies that track changes * @param target * @param attributeValue * @param allowChangeTracking */ public void setRealAttributeValueInObject(Object target, Object attributeValue, boolean allowChangeTracking) { setRealAttributeValueInObject(target, attributeValue); }
/** * INTERNAL: * Set the value of the attribute mapped by this mapping, * placing it inside a value holder if necessary. * If the value holder is not instantiated then it is instantiated. */ public void setRealAttributeValueInObject(Object object, Object value) throws DescriptorException { this.indirectionPolicy.setRealAttributeValueInObject(object, value); }
/** * INTERNAL: * Set the value of the attribute mapped by this mapping, * placing it inside a value holder if necessary. * If the value holder is not instantiated then it is instantiated. */ @Override public void setRealAttributeValueInObject(Object object, Object value) throws DescriptorException { this.indirectionPolicy.setRealAttributeValueInObject(object, value); }
/** * INTERNAL: * Set the value of the appropriate attribute of target to attributeValue. * If the Target has yet to be instantiated then we need to instantiate the target to ensure that * the backup clone is instantiated for comparison. */ public void setRealAttributeValueInObject(Object target, Object attributeValue) { /* Bug 3573808 - do NOT trigger the valueholder; SPECj benchmark deadlocks in this method. Re-ran the original testcase IndirectContainerTestDatabase testMergeCloneWithSerializedTransparentIndirection and it passes without triggering the valueholder. MWN //cr 3788 // Trigger the valueholder when setting the value in an object Object object = this.getMapping().getAttributeValueFromObject(target); if (object instanceof IndirectContainer){ ((IndirectContainer)object).getValueHolder().getValue(); } */ super.setRealAttributeValueInObject(target, attributeValue); }
/** * INTERNAL: * Set the value of the appropriate attribute of target to attributeValue. * If the Target has yet to be instantiated then we need to instantiate the target to ensure that * the backup clone is instantiated for comparison. */ public void setRealAttributeValueInObject(Object target, Object attributeValue) { /* Bug 3573808 - do NOT trigger the valueholder; SPECj benchmark deadlocks in this method. Re-ran the original testcase IndirectContainerTestDatabase testMergeCloneWithSerializedTransparentIndirection and it passes without triggering the valueholder. MWN //cr 3788 // Trigger the valueholder when setting the value in an object Object object = this.getMapping().getAttributeValueFromObject(target); if (object instanceof IndirectContainer){ ((IndirectContainer)object).getValueHolder().getValue(); } */ super.setRealAttributeValueInObject(target, attributeValue); }
/** * INTERNAL: * Set the value of the appropriate attribute of target to attributeValue. * If the Target has yet to be instantiated then we need to instantiate the target to ensure that * the backup clone is instantiated for comparison. */ public void setRealAttributeValueInObject(Object target, Object attributeValue) { /* Bug 3573808 - do NOT trigger the valueholder; SPECj benchmark deadlocks in this method. Re-ran the original testcase IndirectContainerTestDatabase testMergeCloneWithSerializedTransparentIndirection and it passes without triggering the valueholder. MWN //cr 3788 // Trigger the valueholder when setting the value in an object Object object = this.getMapping().getAttributeValueFromObject(target); if (object instanceof IndirectContainer){ ((IndirectContainer)object).getValueHolder().getValue(); } */ super.setRealAttributeValueInObject(target, attributeValue); }
/** * INTERNAL: * Set the value of the attribute mapped by this mapping, * placing it inside a value holder if necessary. * If the value holder is not instantiated then it is instantiated. * Check for write-only, one-way transformations. */ @Override public void setRealAttributeValueInObject(Object object, Object value) throws DescriptorException { if (isWriteOnly()) { return; } this.indirectionPolicy.setRealAttributeValueInObject(object, value); }
/** * INTERNAL: * Set the value of the attribute mapped by this mapping, * placing it inside a value holder if necessary. * If the value holder is not instantiated then it is instantiated. * Check for write-only, one-way transformations. */ @Override public void setRealAttributeValueInObject(Object object, Object value) throws DescriptorException { if (isWriteOnly()) { return; } this.indirectionPolicy.setRealAttributeValueInObject(object, value); }
/** * INTERNAL: * Set the value of the attribute mapped by this mapping, * placing it inside a value holder if necessary. * If the value holder is not instantiated then it is instantiated. * Check for write-only, one-way transformations. */ public void setRealAttributeValueInObject(Object object, Object value) throws DescriptorException { if (this.isWriteOnly()) { return; } this.getIndirectionPolicy().setRealAttributeValueInObject(object, value); }
/** * INTERNAL: * Set the value of the appropriate attribute of target to attributeValue. * In this case, place the value inside the target's ValueHolder. */ public void setRealAttributeValueInObject(Object target, Object attributeValue) { ValueHolderInterface holder = (ValueHolderInterface)this.mapping.getAttributeValueFromObject(target); if (holder == null) { holder = new ValueHolder(attributeValue); } else { holder.setValue(attributeValue); } super.setRealAttributeValueInObject(target, holder); }
/** * INTERNAL: * Set the value of the appropriate attribute of target to attributeValue. * In this case, place the value inside the target's ValueHolder. */ public void setRealAttributeValueInObject(Object target, Object attributeValue) { ValueHolderInterface holder = (ValueHolderInterface)this.mapping.getAttributeValueFromObject(target); if (holder == null) { holder = new ValueHolder(attributeValue); } else { holder.setValue(attributeValue); } super.setRealAttributeValueInObject(target, holder); }
/** * INTERNAL: * Set the value of the appropriate attribute of target to attributeValue. * In this case, place the value inside the target's ValueHolder. */ public void setRealAttributeValueInObject(Object target, Object attributeValue) { ValueHolderInterface holder = (ValueHolderInterface)this.getMapping().getAttributeValueFromObject(target); if (holder == null) { holder = new ValueHolder(attributeValue); } else { holder.setValue(attributeValue); } super.setRealAttributeValueInObject(target, holder); }
@SuppressWarnings({ "rawtypes", "unchecked" }) protected void setMappingValueInObject(Object object, Object attributeValue, DatabaseMapping mapping, DatabaseMapping partner) { if (mapping.isObjectReferenceMapping()) { ((ObjectReferenceMapping) mapping).getIndirectionPolicy().setRealAttributeValueInObject(object, attributeValue, true); if (partner != null) { setMappingValueInObject(attributeValue, object, partner, null); } } else if (mapping.isCollectionMapping()) { ((Collection) mapping.getAttributeValueFromObject(object)).add(attributeValue); if (partner != null) { setMappingValueInObject(attributeValue, object, partner, null); } } }
@SuppressWarnings({ "rawtypes", "unchecked" }) protected void setMappingValueInObject(Object object, Object attributeValue, DatabaseMapping mapping, DatabaseMapping partner) { if (mapping.isObjectReferenceMapping()) { ((ObjectReferenceMapping) mapping).getIndirectionPolicy().setRealAttributeValueInObject(object, attributeValue, true); if (partner != null) { setMappingValueInObject(attributeValue, object, partner, null); } } else if (mapping.isCollectionMapping()) { ((Collection) mapping.getAttributeValueFromObject(object)).add(attributeValue); if (partner != null) { setMappingValueInObject(attributeValue, object, partner, null); } } }
@SuppressWarnings("rawtypes") protected void removeMappingValueFromObject(Object object, Object attributeValue, DatabaseMapping mapping, DatabaseMapping partner) { if (mapping.isObjectReferenceMapping()) { Object currentValue = mapping.getRealAttributeValueFromObject(object, (AbstractSession) getServerSession()); if (currentValue.equals(attributeValue)) { ((ObjectReferenceMapping) mapping).getIndirectionPolicy().setRealAttributeValueInObject(object, null, true); if (partner != null) { removeMappingValueFromObject(attributeValue, object, partner, null); } } } else if (mapping.isCollectionMapping()) { boolean removed = ((Collection) mapping.getRealAttributeValueFromObject(object, (AbstractSession) getServerSession())).remove(attributeValue); if (removed && partner != null) { removeMappingValueFromObject(attributeValue, object, partner, null); } } }
@SuppressWarnings("rawtypes") protected void removeMappingValueFromObject(Object object, Object attributeValue, DatabaseMapping mapping, DatabaseMapping partner) { if (mapping.isObjectReferenceMapping()) { Object currentValue = mapping.getRealAttributeValueFromObject(object, (AbstractSession) getServerSession()); if (currentValue.equals(attributeValue)) { ((ObjectReferenceMapping) mapping).getIndirectionPolicy().setRealAttributeValueInObject(object, null, true); if (partner != null) { removeMappingValueFromObject(attributeValue, object, partner, null); } } } else if (mapping.isCollectionMapping()) { boolean removed = ((Collection) mapping.getRealAttributeValueFromObject(object, (AbstractSession) getServerSession())).remove(attributeValue); if (removed && partner != null) { removeMappingValueFromObject(attributeValue, object, partner, null); } } }