public void populateRow(DatabaseField[] fieldsArray, Object[] values, ResultSet resultSet, ResultSetMetaData metaData, AbstractSession session, int startIndex, int endIndex) throws DatabaseException { // PERF: Pass platform and optimize data flag. DatabasePlatform platform = getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); for (int index = startIndex; index < endIndex; index++) { DatabaseField field = fieldsArray[index]; // Field can be null for fetch groups. if (field != null) { values[index] = getObject(resultSet, field, metaData, index + 1, platform, optimizeData, session); } } }
public void populateRow(DatabaseField[] fieldsArray, Object[] values, ResultSet resultSet, ResultSetMetaData metaData, AbstractSession session, int startIndex, int endIndex) throws DatabaseException { // PERF: Pass platform and optimize data flag. DatabasePlatform platform = getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); for (int index = startIndex; index < endIndex; index++) { DatabaseField field = fieldsArray[index]; // Field can be null for fetch groups. if (field != null) { values[index] = getObject(resultSet, field, metaData, index + 1, platform, optimizeData, session); } } }
/** * Return a new DatabaseRow.<p> * Populate the row from the data in cursor. The fields representing the results * and the order of the results are stored in fields. * <p><b>NOTE</b>: * Make sure that the field name is set. An empty field name placeholder is * used in the sortFields() method when the number of fields defined does not * match the number of column names available on the database. * PERF: This method must be highly optimized. */ protected AbstractRecord fetchRow(Vector fields, ResultSet resultSet, ResultSetMetaData metaData, AbstractSession session) throws DatabaseException { int size = fields.size(); Vector values = NonSynchronizedVector.newInstance(size); // PERF: Pass platform and optimize data flag. DatabasePlatform platform = getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); for (int index = 0; index < size; index++) { DatabaseField field = (DatabaseField)fields.elementAt(index); // Field can be null for fetch groups. if (field != null) { values.add(getObject(resultSet, field, metaData, index + 1, platform, optimizeData, session)); } else { values.add(null); } } // Row creation is optimized through sharing the same fields for the entire result set. return new DatabaseRecord(fields, values); }
/** * Return a new DatabaseRow.<p> * Populate the row from the data in cursor. The fields representing the results * and the order of the results are stored in fields. * <p><b>NOTE</b>: * Make sure that the field name is set. An empty field name placeholder is * used in the sortFields() method when the number of fields defined does not * match the number of column names available on the database. * PERF: This method must be highly optimized. */ protected AbstractRecord fetchRow(Vector fields, ResultSet resultSet, ResultSetMetaData metaData, AbstractSession session) throws DatabaseException { int size = fields.size(); Vector values = NonSynchronizedVector.newInstance(size); // PERF: Pass platform and optimize data flag. DatabasePlatform platform = getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); for (int index = 0; index < size; index++) { DatabaseField field = (DatabaseField)fields.elementAt(index); // Field can be null for fetch groups. if (field != null) { values.add(getObject(resultSet, field, metaData, index + 1, platform, optimizeData, session)); } else { values.add(null); } } // Row creation is optimized through sharing the same fields for the entire result set. return new DatabaseRecord(fields, values); }
/** * Return a new DatabaseRow.<p> * Populate the row from the data in cursor. The fields representing the results * and the order of the results are stored in fields. * <p><b>NOTE</b>: * Make sure that the field name is set. An empty field name placeholder is * used in the sortFields() method when the number of fields defined does not * match the number of column names available on the database. * PERF: This method must be highly optimized. */ protected AbstractRecord fetchRow(Vector fields, ResultSet resultSet, ResultSetMetaData metaData, AbstractSession session) throws DatabaseException { int size = fields.size(); Vector values = NonSynchronizedVector.newInstance(size); // PERF: Pass platform and optimize data flag. DatabasePlatform platform = getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); for (int index = 0; index < size; index++) { DatabaseField field = (DatabaseField)fields.elementAt(index); // Field can be null for fetch groups. if (field != null) { values.add(getObject(resultSet, field, metaData, index + 1, platform, optimizeData, session)); } else { values.add(null); } } // Row creation is optimized through sharing the same fields for the entire result set. return new DatabaseRecord(fields, values); }
/** * Return a new DatabaseRow.<p> * Populate the row from the data in cursor. The fields representing the results * and the order of the results are stored in fields. * <p><b>NOTE</b>: * Make sure that the field name is set. An empty field name placeholder is * used in the sortFields() method when the number of fields defined does not * match the number of column names available on the database. * PERF: This method must be highly optimized. */ public AbstractRecord fetchRow(Vector fields, DatabaseField[] fieldsArray, ResultSet resultSet, ResultSetMetaData metaData, AbstractSession session) throws DatabaseException { int size = fieldsArray.length; Object[] values = new Object[size]; // PERF: Pass platform and optimize data flag. DatabasePlatform platform = getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); for (int index = 0; index < size; index++) { DatabaseField field = fieldsArray[index]; // Field can be null for fetch groups. if (field != null) { values[index] = getObject(resultSet, field, metaData, index + 1, platform, optimizeData, session); } else { values[index] = null; } } // Row creation is optimized through sharing the same fields for the entire result set. return new ArrayRecord(fields, fieldsArray, values); } public void populateRow(DatabaseField[] fieldsArray, Object[] values, ResultSet resultSet, ResultSetMetaData metaData, AbstractSession session, int startIndex, int endIndex) throws DatabaseException {
/** * Return a new DatabaseRow.<p> * Populate the row from the data in cursor. The fields representing the results * and the order of the results are stored in fields. * <p><b>NOTE</b>: * Make sure that the field name is set. An empty field name placeholder is * used in the sortFields() method when the number of fields defined does not * match the number of column names available on the database. * PERF: This method must be highly optimized. */ public AbstractRecord fetchRow(Vector fields, DatabaseField[] fieldsArray, ResultSet resultSet, ResultSetMetaData metaData, AbstractSession session) throws DatabaseException { int size = fieldsArray.length; Object[] values = new Object[size]; // PERF: Pass platform and optimize data flag. DatabasePlatform platform = getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); for (int index = 0; index < size; index++) { DatabaseField field = fieldsArray[index]; // Field can be null for fetch groups. if (field != null) { values[index] = getObject(resultSet, field, metaData, index + 1, platform, optimizeData, session); } else { values[index] = null; } } // Row creation is optimized through sharing the same fields for the entire result set. return new ArrayRecord(fields, fieldsArray, values); } public void populateRow(DatabaseField[] fieldsArray, Object[] values, ResultSet resultSet, ResultSetMetaData metaData, AbstractSession session, int startIndex, int endIndex) throws DatabaseException {
AbstractSession executionSession = getExecutionSession(); DatabasePlatform platform = dbAccessor.getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); if (useSimple) {
AbstractSession executionSession = getExecutionSession(); DatabasePlatform platform = dbAccessor.getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); if (useSimple) {
DatabaseAccessor dbAccessor = (DatabaseAccessor)query.getAccessor(); DatabasePlatform platform = dbAccessor.getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); if (this.isSimple) {
DatabaseAccessor dbAccessor = (DatabaseAccessor)query.getAccessor(); DatabasePlatform platform = dbAccessor.getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); if (this.isSimple) {
boolean useSimple = this.descriptor.getObjectBuilder().isSimple(); DatabasePlatform platform = dbAccessor.getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); if (useSimple) { row = new SimpleResultSetRecord(call.getFields(), call.getFieldsArray(), resultSet, metaData, dbAccessor, getExecutionSession(), platform, optimizeData);
boolean useSimple = this.descriptor.getObjectBuilder().isSimple(); DatabasePlatform platform = dbAccessor.getPlatform(); boolean optimizeData = platform.shouldOptimizeDataConversion(); if (useSimple) { row = new SimpleResultSetRecord(call.getFields(), call.getFieldsArray(), resultSet, metaData, dbAccessor, getExecutionSession(), platform, optimizeData);
/** * Copy the state into the new platform. */ public void copyInto(Platform platform) { super.copyInto(platform); if (!(platform instanceof DatabasePlatform)) { return; } DatabasePlatform databasePlatform = (DatabasePlatform)platform; databasePlatform.setShouldTrimStrings(shouldTrimStrings()); databasePlatform.setUsesNativeSQL(usesNativeSQL()); databasePlatform.setUsesByteArrayBinding(usesByteArrayBinding()); databasePlatform.setUsesStringBinding(usesStringBinding()); databasePlatform.setShouldBindAllParameters(shouldBindAllParameters()); databasePlatform.setShouldCacheAllStatements(shouldCacheAllStatements()); databasePlatform.setStatementCacheSize(getStatementCacheSize()); databasePlatform.setTransactionIsolation(getTransactionIsolation()); databasePlatform.setMaxBatchWritingSize(getMaxBatchWritingSize()); databasePlatform.setShouldForceFieldNamesToUpperCase(shouldForceFieldNamesToUpperCase()); databasePlatform.setShouldOptimizeDataConversion(shouldOptimizeDataConversion()); databasePlatform.setStringBindingSize(getStringBindingSize()); databasePlatform.setUsesBatchWriting(usesBatchWriting()); databasePlatform.setUsesJDBCBatchWriting(usesJDBCBatchWriting()); databasePlatform.setUsesNativeBatchWriting(usesNativeBatchWriting()); databasePlatform.setUsesStreamsForBinding(usesStreamsForBinding()); }
databasePlatform.setMaxBatchWritingSize(getMaxBatchWritingSize()); databasePlatform.setShouldForceFieldNamesToUpperCase(shouldForceFieldNamesToUpperCase()); databasePlatform.setShouldOptimizeDataConversion(shouldOptimizeDataConversion()); databasePlatform.setStringBindingSize(getStringBindingSize()); databasePlatform.setUsesBatchWriting(usesBatchWriting());
databasePlatform.setMaxBatchWritingSize(getMaxBatchWritingSize()); databasePlatform.setShouldForceFieldNamesToUpperCase(shouldForceFieldNamesToUpperCase()); databasePlatform.setShouldOptimizeDataConversion(shouldOptimizeDataConversion()); databasePlatform.setStringBindingSize(getStringBindingSize()); databasePlatform.setUsesBatchWriting(usesBatchWriting());