/** * INTERNAL: * Indicates whether valueFromRow should call valueFromRowInternalWithJoin (true) * or valueFromRowInternal (false) */ protected boolean shouldUseValueFromRowWithJoin(JoinedAttributeManager joinManager) { return joinManager.getDataResults_()!=null && super.shouldUseValueFromRowWithJoin(joinManager); }
/** * 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 query, AbstractSession executionSession) throws DatabaseException { if(shouldUseValueFromRowWithJoin(joinManager)) { return valueFromRowInternalWithJoin(row, joinManager, executionSession); } else { return valueFromRowInternal(row, joinManager, executionSession); } }