/** * Ensure that the backup value holder is populated. */ public void setValue(Object theValue) { // Must force instantiation to be able to compare with the old value. if (!this.isInstantiated) { instantiate(); } Object oldValue = getValue(); super.setValue(theValue); updateForeignReferenceSet(theValue, oldValue); }
/** * Ensure that the backup value holder is populated. */ public void setValue(Object theValue) { // Must force instantiation to be able to compare with the old value. if (!this.isInstantiated) { instantiate(); } super.setValue(theValue); } }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by the query. * In this case, wrap the query in an IndirectContainer for later invocation. */ public Object valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session) { return this.buildIndirectContainer(new QueryBasedValueHolder(query, row, session)); }
/** * INTERNAL: * Return the original indirection object for a unit of work indirection object. */ @Override public Object getOriginalIndirectionObjectForMerge(Object unitOfWorkIndirectionObject, AbstractSession session) { DatabaseValueHolder holder = (DatabaseValueHolder)getOriginalIndirectionObject(unitOfWorkIndirectionObject, session); if (holder != null && holder.getSession()!= null){ holder.setSession(session); } return holder; }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by the batchQuery. * In this case, wrap the query in an IndirectContainer for later invocation. */ public Object valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey) { return this.buildIndirectContainer(new BatchValueHolder(batchQuery, row, getForeignReferenceMapping(), originalQuery, parentCacheKey)); }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by the batchQuery. * In this case, wrap the query in a ValueHolder for later invocation. */ public Object valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey) { ValueHolderInterface valueHolder = (ValueHolderInterface)super.valueFromBatchQuery(batchQuery, row, originalQuery, parentCacheKey); return buildContainer(valueHolder); }
/** * Ensure that the backup value holder is populated. */ public void setValue(Object theValue) { // Must force instantiation to be able to compare with the old value. if (!isInstantiated()) { instantiate(); } super.setValue(theValue); } }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by the batchQuery. * In this case, wrap the query in a ValueHolder for later invocation. */ public Object valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey) { return new BatchValueHolder(batchQuery, row, this.getForeignReferenceMapping(), originalQuery, parentCacheKey); }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by invoking the appropriate * method on the object and passing it the row and session. * In this case, wrap the row in a ValueHolder for later use. */ public Object valueFromMethod(Object object, AbstractRecord row, AbstractSession session) { ValueHolderInterface valueHolder = (ValueHolderInterface)super.valueFromMethod(object, row, session); return buildContainer(valueHolder); }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by the query. * In this case, wrap the query in a ValueHolder for later invocation. */ public Object valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session) { ValueHolderInterface valueHolder = (ValueHolderInterface)super.valueFromQuery(query, row, session); return buildContainer(valueHolder); }
/** * Reset all the fields that are not needed after instantiation. */ protected void resetFields() { super.resetFields(); setArgumentRow(null); setMapping(null); }
/** * Reset all the fields that are not needed after instantiation. */ protected void resetFields() { super.resetFields(); setQuery(null); }
/** * Ensure that the backup value holder is populated. */ public void setValue(Object theValue) { // Must force instantiation to be able to compare with the old value. if (!this.isInstantiated) { instantiate(); } Object oldValue = getValue(); super.setValue(theValue); updateForeignReferenceSet(theValue, oldValue); }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by the query. * In this case, wrap the query in an IndirectContainer for later invocation. */ public Object valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session) { return this.buildIndirectContainer(new QueryBasedValueHolder(query, row, session)); }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by the batchQuery. * In this case, wrap the query in a ValueHolder for later invocation. */ public Object valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey) { ValueHolderInterface valueHolder = (ValueHolderInterface)super.valueFromBatchQuery(batchQuery, row, originalQuery, parentCacheKey); return buildContainer(valueHolder); }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by the batchQuery. * In this case, wrap the query in a ValueHolder for later invocation. */ public Object valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery) { return new BatchValueHolder(batchQuery, row, this.getForeignReferenceMapping(), originalQuery); }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by the query. * In this case, wrap the query in an IndirectContainer for later invocation. */ public Object valueFromQuery(ReadQuery query, AbstractRecord row, AbstractSession session) { return this.buildIndirectContainer(new QueryBasedValueHolder(query, row, session)); }
/** * INTERNAL: * Return the value to be stored in the object's attribute. * This value is determined by the batchQuery. * In this case, wrap the query in a ValueHolder for later invocation. */ public Object valueFromBatchQuery(ReadQuery batchQuery, AbstractRecord row, ObjectLevelReadQuery originalQuery) { ValueHolderInterface valueHolder = (ValueHolderInterface)super.valueFromBatchQuery(batchQuery, row, originalQuery); return buildContainer(valueHolder); }
/** * INTERNAL: * A combination of valueFromQuery and valueFromRow(object). * Sometimes the attribute is known (joining) but we still need to hang on * to the query (pessimistic locking). */ public Object valueFromQuery(ReadQuery query, AbstractRecord row, Object object, AbstractSession session) { return this.buildIndirectContainer(new QueryBasedValueHolder(query, object, row, session)); }
/** * INTERNAL: * A combination of valueFromQuery and valueFromRow(object). * Sometimes the attribute is known (joining) but we still need to hang on * to the query (pessimistic locking). */ public Object valueFromQuery(ReadQuery query, AbstractRecord row, Object object, AbstractSession session) { return this.buildIndirectContainer(new QueryBasedValueHolder(query, object, row, session)); }