/** * Read a single row from the database. * This is used from query mechanism during an abstract-multiple table read. */ public AbstractRecord selectOneRowFromConcreteTable() throws DatabaseException { ObjectLevelReadQuery query = (ObjectLevelReadQuery)this.query; // PERF: First check the subclass calls cache for the prepared call. DatabaseCall call = query.getConcreteSubclassCalls().get(query.getReferenceClass()); if (call == null) { setSQLStatement(buildConcreteSelectStatement()); // Must also build the call. super.prepareSelectOneRow(); query.getConcreteSubclassCalls().put(query.getReferenceClass(), (DatabaseCall)this.call); } else { setCall(call); } return super.selectOneRow(); }
/** * Read all rows from the database. * This is used only from query mechanism on a abstract-multiple table read. */ public Vector selectAllRowsFromConcreteTable() throws DatabaseException { ObjectLevelReadQuery query = (ObjectLevelReadQuery)this.query; // PERF: First check the subclass calls cache for the prepared call. // Must clear the translation row to avoid in-lining parameters unless not a prepared query. boolean shouldPrepare = query.shouldPrepare(); DatabaseCall call = null; if (shouldPrepare) { call = query.getConcreteSubclassCalls().get(query.getReferenceClass()); } if (call == null) { AbstractRecord translationRow = query.getTranslationRow(); if (shouldPrepare) { query.setTranslationRow(null); } setSQLStatement(buildConcreteSelectStatement()); // Must also build the call. super.prepareSelectAllRows(); if (shouldPrepare) { query.getConcreteSubclassCalls().put(query.getReferenceClass(), (DatabaseCall)this.call); query.setTranslationRow(translationRow); } } else { setCall(call); } return super.selectAllRows(); }
DatabaseCall call = null; if (shouldPrepare) { call = query.getConcreteSubclassCalls().get(query.getReferenceClass()); query.getConcreteSubclassJoinedMappingIndexes().put(query.getReferenceClass(), query.getJoinedAttributeManager().getJoinedMappingIndexes_()); query.getConcreteSubclassCalls().put(query.getReferenceClass(), (DatabaseCall)this.call); query.setTranslationRow(translationRow);
DatabaseCall call = null; if (shouldPrepare) { call = query.getConcreteSubclassCalls().get(query.getReferenceClass()); query.getConcreteSubclassJoinedMappingIndexes().put(query.getReferenceClass(), query.getJoinedAttributeManager().getJoinedMappingIndexes_()); query.getConcreteSubclassCalls().put(query.getReferenceClass(), (DatabaseCall)this.call); query.setTranslationRow(translationRow);
DatabaseCall call = null; if (shouldPrepare) { call = query.getConcreteSubclassCalls().get(query.getReferenceClass()); query.getConcreteSubclassJoinedMappingIndexes().put(query.getReferenceClass(), query.getJoinedAttributeManager().getJoinedMappingIndexes_()); query.getConcreteSubclassCalls().put(query.getReferenceClass(), (DatabaseCall)this.call); query.setTranslationRow(translationRow);
DatabaseCall call = null; if (shouldPrepare) { call = query.getConcreteSubclassCalls().get(query.getReferenceClass()); query.getConcreteSubclassJoinedMappingIndexes().put(query.getReferenceClass(), query.getJoinedAttributeManager().getJoinedMappingIndexes_()); query.getConcreteSubclassCalls().put(query.getReferenceClass(), (DatabaseCall)this.call); query.setTranslationRow(translationRow);
getConcreteSubclassCalls(); if (hasJoining()) { getConcreteSubclassJoinedMappingIndexes();
getConcreteSubclassCalls(); if (hasJoining()) { getConcreteSubclassJoinedMappingIndexes();