/** * If the original value holder was not instantiated, * then first instantiate it to obtain the backup value. */ @Override public Object instantiate() { // Ensures instantiation of the original, and setting of this back value holder's value. return this.unitOfWorkValueHolder.getValue(); }
/** * INTERNAL: * Return the "real" attribute value, as opposed to any wrapper. * This will trigger the wrapper to instantiate the value. */ public Object getRealAttributeValueFromObject(Object object, Object attribute) { if (attribute instanceof ValueHolderInterface) { return ((ValueHolderInterface)attribute).getValue(); } else { return attribute; } }
/** * INTERNAL: This method can be used when an Indirection Object is required * to be built from a provided ValueHolderInterface object. This may be used * for custom value holder types. Certain policies like the * TransparentIndirectionPolicy may wrap the valueholder in another object. */ public Object buildIndirectObject(ValueHolderInterface valueHolder){ return valueHolder.getValue(); }
/** * INTERNAL: * Return the "real" attribute value, as opposed to any wrapper. * This will trigger the wrapper to instantiate the value. */ public Object getRealAttributeValueFromObject(Object object, Object attribute) { if (attribute instanceof ValueHolderInterface) { return ((ValueHolderInterface)attribute).getValue(); } else { return attribute; } }
/** * INTERNAL: * Return the "real" attribute value, as opposed to any wrapper. * This will trigger the wrapper to instantiate the value. */ public Object getRealAttributeValueFromObject(Object object, Object attribute) { if (attribute instanceof ValueHolderInterface) { return ((ValueHolderInterface)attribute).getValue(); } else { return attribute; } }
/** * If the original value holder was not instantiated, * then first instantiate it to obtain the backup value. */ @Override public Object instantiate() { // Ensures instantiation of the original, and setting of this back value holder's value. return this.unitOfWorkValueHolder.getValue(); }
/** * INTERNAL: This method can be used when an Indirection Object is required * to be built from a provided ValueHolderInterface object. This may be used * for custom value holder types. Certain policies like the * TransparentIndirectionPolicy may wrap the valueholder in another object. */ public Object buildIndirectObject(ValueHolderInterface valueHolder){ return valueHolder.getValue(); }
/** * INTERNAL: This method can be used when an Indirection Object is required * to be built from a provided ValueHolderInterface object. This may be used * for custom value holder types. Certain policies like the * TransparentIndirectionPolicy may wrap the valueholder in another object. */ public Object buildIndirectObject(ValueHolderInterface valueHolder){ return valueHolder.getValue(); }
/** * Return the freshly-built delegate. */ protected Hashtable<K, V> buildDelegate() { Hashtable<K, V> value = (Hashtable<K, V>)getValueHolder().getValue(); if (value == null) { value = new Hashtable<>(this.initialCapacity, this.loadFactor); } return value; }
/** * INTERNAL: * Return the "real" attribute value, as opposed to any wrapper. * This will trigger the wrapper to instantiate the value. */ public Object getRealAttributeValueFromObject(Object object, Object attribute) { return ((IndirectContainer)attribute).getValueHolder().getValue(); }
/** * INTERNAL: * Return the "real" attribute value, as opposed to any wrapper. * This will trigger the wrapper to instantiate the value. */ public Object getRealAttributeValueFromObject(Object object, Object attribute) { return ((IndirectContainer)attribute).getValueHolder().getValue(); }
/** * INTERNAL: * Given a proxy object, trigger the indirection and return the actual object represented by the proxy. */ public static Object getValueFromProxy(Object value) { if (Proxy.isProxyClass(value.getClass())) { return ((ProxyIndirectionHandler)Proxy.getInvocationHandler(value)).getValueHolder().getValue(); } return value; }
/** * INTERNAL: * Given a proxy object, trigger the indirection and return the actual object represented by the proxy. */ public static Object getValueFromProxy(Object value) { if (Proxy.isProxyClass(value.getClass())) { return ((ProxyIndirectionHandler)Proxy.getInvocationHandler(value)).getValueHolder().getValue(); } return value; }
/** * INTERNAL: * Given a proxy object, trigger the indirection and return the actual object represented by the proxy. */ public static Object getValueFromProxy(Object value) { if (Proxy.isProxyClass(value.getClass())) { return ((ProxyIndirectionHandler)Proxy.getInvocationHandler(value)).getValueHolder().getValue(); } return value; }
/** * Return the freshly-built delegate. */ protected Hashtable<K, V> buildDelegate() { Hashtable<K, V> value = (Hashtable<K, V>)getValueHolder().getValue(); if (value == null) { value = new Hashtable<>(this.initialCapacity, this.loadFactor); } return value; }
/** * INTERNAL: * Return the "real" attribute value, as opposed to any wrapper. * This will trigger the wrapper to instantiate the value. */ public Object getRealAttributeValueFromObject(Object object, Object attribute) { return ((IndirectContainer)attribute).getValueHolder().getValue(); }
/** * Return the freshly-built delegate. */ protected Hashtable buildDelegate() { return (Hashtable)getValueHolder().getValue(); }
@Override public Object getAttributeValueFromObject(Object entity) throws DescriptorException { Map<String, PropertyWrapper> propertiesMap = ((XRDynamicEntity)entity).getPropertiesMap(); PropertyWrapper wrapper = propertiesMap.get(attributeName); Object v = null; if (wrapper.isSet()) { v = ((ValueHolderInterface)wrapper.getValue()).getValue(); } return v; }
@Override public Object getAttributeValueFromObject(Object entity) throws DescriptorException { Map<String, PropertyWrapper> propertiesMap = ((XRDynamicEntity)entity).getPropertiesMap(); PropertyWrapper wrapper = propertiesMap.get(attributeName); Object v = null; if (wrapper.isSet()) { v = ((ValueHolderInterface)wrapper.getValue()).getValue(); } return v; }
public Object getAttributeValueFromObject(Object object) { if(isValueHolderProperty) { ValueHolderInterface vh = (ValueHolderInterface)ormAccessor.getAttributeValueFromObject(object); if(vh != null && !vh.isInstantiated()) { Object value = vh.getValue(); oxmAccessor.setAttributeValueInObject(object, value); if(vh instanceof WeavedAttributeValueHolderInterface) { ((WeavedAttributeValueHolderInterface)vh).setIsCoordinatedWithProperty(true); } } } return oxmAccessor.getAttributeValueFromObject(object); }