Package org.hibernate.dialect
Enum ResultColumnReferenceStrategy
- java.lang.Object
-
- java.lang.Enum<ResultColumnReferenceStrategy>
-
- org.hibernate.dialect.ResultColumnReferenceStrategy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ResultColumnReferenceStrategy>
public enum ResultColumnReferenceStrategy extends java.lang.Enum<ResultColumnReferenceStrategy>
Defines how we need to reference columns in the group-by, having, and order-by clauses.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALIAS
For databases which do not supportSOURCE
, ANSI SQL defines two allowable approaches.ORDINAL
For databases which do not supportSOURCE
, ANSI SQL defines two allowable approaches.SOURCE
This strategy says to reference the result columns by the qualified column name found in the result source.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResultColumnReferenceStrategy
resolveByName(java.lang.String name)
Resolves the strategy by name, in a case insensitive manner.static ResultColumnReferenceStrategy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ResultColumnReferenceStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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.
-
ALIAS
public static final ResultColumnReferenceStrategy ALIAS
-
ORDINAL
public static final ResultColumnReferenceStrategy ORDINAL
-
-
Method Detail
-
values
public static ResultColumnReferenceStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ResultColumnReferenceStrategy c : ResultColumnReferenceStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ResultColumnReferenceStrategy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
resolveByName
public static ResultColumnReferenceStrategy resolveByName(java.lang.String name)
Resolves the strategy by name, in a case insensitive manner. If the name cannot be resolved,SOURCE
is returned as the default.- Parameters:
name
- The strategy name to resolve- Returns:
- The resolved strategy
-
-