/** * INTERNAL: Return the value of the reference attribute or a value holder. * Check whether the mapping's attribute should be optimized through batch * and joining. */ public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, AbstractSession executionSession) throws DatabaseException { // PERF: Direct variable access. // If the query uses batch reading, return a special value holder // or retrieve the object from the query property. if (sourceQuery.isReadAllQuery() && (((ReadAllQuery)sourceQuery).isAttributeBatchRead(this.descriptor, getAttributeName()) || this.usesBatchReading)) { return batchedValueFromRow(row, (ReadAllQuery)sourceQuery); } if (shouldUseValueFromRowWithJoin(joinManager, sourceQuery)) { return valueFromRowInternalWithJoin(row, joinManager, sourceQuery, executionSession); } else { return valueFromRowInternal(row, joinManager, sourceQuery, executionSession); } }
return batchedValueFromRow(row, (ObjectLevelReadQuery)sourceQuery, cacheKey); } else { return valueFromRowInternal(row, joinManager, sourceQuery, executionSession, false);
return batchedValueFromRow(row, (ObjectLevelReadQuery)sourceQuery, cacheKey); } else { return valueFromRowInternal(row, joinManager, sourceQuery, executionSession, false);