org.hibernate.dialect
Class ResultColumnReferenceStrategy
java.lang.Object
org.hibernate.dialect.ResultColumnReferenceStrategy
- Serializable
public class ResultColumnReferenceStrategy
extends java.lang.Object
implements Serializable
Defines how we need to reference columns in the group-by, having, and order-by
clauses.
ALIAS
public static final ResultColumnReferenceStrategy ALIAS
For databases which do not support
SOURCE
, ANSI SQL defines two allowable
approaches. One is to reference the result column by the alias it is given in the
result source (if it is given an alias). This strategy says to use this approach.
The other QNSI SQL compliant approach is
ORDINAL
.
ORDINAL
public static final ResultColumnReferenceStrategy ORDINAL
For databases which do not support
SOURCE
, ANSI SQL defines two allowable
approaches. One is to reference the result column by the ordinal position at which
it appears in the result source. This strategy says to use this approach.
The other QNSI SQL compliant approach is
ALIAS
.
SOURCE
public static final ResultColumnReferenceStrategy SOURCE
This strategy says to reference the result columns by the qualified column name
found in the result source. This strategy is not strictly allowed by ANSI SQL
but is Hibernate's legacy behavior and is also the fastest of the strategies; thus
it should be used if supported by the underlying database.
ResultColumnReferenceStrategy
public ResultColumnReferenceStrategy(String name)
toString
public String toString()