## org.hibernate.dialect
Interface ColumnAliasExtractor

    public interface ColumnAliasExtractor

Strategy for extracting the unique column alias out of a `ResultSetMetaData`. This is used during the "auto discovery" phase of native SQL queries.

Generally this should be done via `ResultSetMetaData.getColumnLabel(int)`, but not all drivers do this correctly.

Field Summary
`static ColumnAliasExtractor` `COLUMN_LABEL_EXTRACTOR` An extractor which uses `ResultSetMetaData.getColumnLabel(int)`
`static ColumnAliasExtractor` `COLUMN_NAME_EXTRACTOR` An extractor which uses `ResultSetMetaData.getColumnName(int)`

Method Summary
`String` `extractColumnAlias(ResultSetMetaData metaData, int position)` Extract the unique column alias.

Field Detail

### COLUMN_LABEL_EXTRACTOR

    static final ColumnAliasExtractor COLUMN_LABEL_EXTRACTOR

  An extractor which uses `ResultSetMetaData.getColumnLabel(int)`

### COLUMN_NAME_EXTRACTOR

    static final ColumnAliasExtractor COLUMN_NAME_EXTRACTOR

  An extractor which uses `ResultSetMetaData.getColumnName(int)`

Method Detail

### extractColumnAlias

    String extractColumnAlias(ResultSetMetaData metaData,
                              int position)
                              throws SQLException

  Extract the unique column alias.

  Parameters:
    `metaData` - The result set metadata
    `position` - The column position
  Returns:
    The alias
  Throws:
    `SQLException`

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.