Top Description Fields Constructors Methods
org.hibernate.engine.jdbc

public final Class ColumnNameCache

extends Object
Class Inheritance
Annotations
@Deprecated
Imports
java.sql.ResultSet, .SQLException, java.util.concurrent.ConcurrentHashMap

Deprecated

(since 5.5) Scheduled for removal in 6.0 as ResultSet wrapping is no longer needed

Cache of column-name -> column-index resolutions
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final ConcurrentHashMap<String, Integer>
private static final float

Constructor Summary

AccessConstructor and Description
public
ColumnNameCache(int
The number of columns to be cached.
columnCount
)

Constructs a ColumnNameCache

Method Summary

Modifier and TypeMethod and Description
public Integer

Returns:

The index
getIndexForColumnName
(String
The name/alias of the column
columnName
,
ResultSet
The ResultSet
rs
)

Resolve the column name/alias to its index

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnNameToIndexCacheback to summary
private final ConcurrentHashMap<String, Integer> columnNameToIndexCache
LOAD_FACTORback to summary
private static final float LOAD_FACTOR

Constructor Detail

ColumnNameCacheback to summary
public ColumnNameCache(int columnCount)

Constructs a ColumnNameCache

Parameters
columnCount:int

The number of columns to be cached.

Method Detail

getIndexForColumnNameback to summary
public Integer getIndexForColumnName(String columnName, ResultSet rs) throws SQLException

Resolve the column name/alias to its index

Parameters
columnName:String

The name/alias of the column

rs:ResultSet

The ResultSet

Returns:Integer

The index

Exceptions
SQLException:
INdicates a problems accessing the underlying JDBC ResultSet