/** * Locate the column index corresponding to the given column name via the cache. * * @param columnName The column name to resolve into an index. * @return The column index corresponding to the given column name. * @throws SQLException if the ResultSet object does not contain columnName or a database access error occurs */ private Integer findColumn(String columnName) throws SQLException { return columnNameCache.getIndexForColumnName( columnName, rs ); }
private ColumnNameCache retreiveColumnNameToIndexCache(ResultSet rs) throws SQLException { if ( columnNameCache == null ) { log.trace( "Building columnName->columnIndex cache" ); columnNameCache = new ColumnNameCache( rs.getMetaData().getColumnCount() ); } return columnNameCache; }
/** * Locate the column index corresponding to the given column name via the cache. * * @param columnName The column name to resolve into an index. * @return The column index corresponding to the given column name. * @throws SQLException if the ResultSet object does not contain columnName or a database access error occurs */ private int findColumn(String columnName) throws SQLException { return columnNameCache.getIndexForColumnName( columnName, rs ); }
private ColumnNameCache retrieveColumnNameToIndexCache(final ResultSet rs) throws SQLException { final ColumnNameCache cache = columnNameCache; if ( cache == null ) { //there is no need for a synchronized second check, as in worst case //we'll have allocated an unnecessary ColumnNameCache LOG.trace( "Building columnName -> columnIndex cache" ); columnNameCache = new ColumnNameCache( rs.getMetaData().getColumnCount() ); return columnNameCache; } else { return cache; } }
/** * Locate the column index corresponding to the given column name via the cache. * * @param columnName The column name to resolve into an index. * @return The column index corresponding to the given column name. * @throws SQLException if the ResultSet object does not contain columnName or a database access error occurs */ private Integer findColumn(String columnName) throws SQLException { return columnNameCache.getIndexForColumnName( columnName, rs ); }
private ColumnNameCache retreiveColumnNameToIndexCache(ResultSet rs) throws SQLException { if ( columnNameCache == null ) { LOG.trace( "Building columnName->columnIndex cache" ); columnNameCache = new ColumnNameCache( rs.getMetaData().getColumnCount() ); } return columnNameCache; }
/** * Locate the column index corresponding to the given column name via the cache. * * @param columnName The column name to resolve into an index. * @return The column index corresponding to the given column name. * @throws SQLException if the ResultSet object does not contain columnName or a database access error occurs */ private int findColumn(String columnName) throws SQLException { return columnNameCache.getIndexForColumnName( columnName, rs ); }
private ColumnNameCache retreiveColumnNameToIndexCache(ResultSet rs) throws SQLException { if ( columnNameCache == null ) { LOG.trace( "Building columnName->columnIndex cache" ); columnNameCache = new ColumnNameCache( rs.getMetaData().getColumnCount() ); } return columnNameCache; }