Package org.hibernate.graph
Enum GraphSemantic
- java.lang.Object
-
- java.lang.Enum<GraphSemantic>
-
- org.hibernate.graph.GraphSemantic
-
- All Implemented Interfaces:
Serializable
,Comparable<GraphSemantic>
public enum GraphSemantic extends Enum<GraphSemantic>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FETCH
Indicates that anEntityGraph
should be interpreted as a JPA "fetch graph".LOAD
Indicates that anEntityGraph
should be interpreted as a JPA "load graph".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static GraphSemantic
fromHintName(String hintName)
static GraphSemantic
fromJpaHintName(String hintName)
Deprecated.UsefromHintName(java.lang.String)
insteadString
getJakartaHintName()
The corresponding Jakarta Persistence hint name.String
getJpaHintName()
Deprecated.UsegetJakartaHintName()
insteadstatic GraphSemantic
valueOf(String name)
Returns the enum constant of this type with the specified name.static GraphSemantic[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FETCH
public static final GraphSemantic FETCH
Indicates that anEntityGraph
should be interpreted as a JPA "fetch graph".- Attributes explicitly specified using an
AttributeNode
s are treated asFetchType.EAGER
and fetched via a join or subsequent select. - Attributes not explicitly specified are treated as
FetchType.LAZY
and are not fetched.
- Attributes explicitly specified using an
-
LOAD
public static final GraphSemantic LOAD
Indicates that anEntityGraph
should be interpreted as a JPA "load graph".- Attributes explicitly specified using an
AttributeNode
s are treated asFetchType.EAGER
and fetched via a join or subsequent select. - Attributes not explicitly specified are treated as
FetchType.LAZY
orFetchType.EAGER
depending on the mapping of the attribute, instead of forcingFetchType.LAZY
.
- Attributes explicitly specified using an
-
-
Method Detail
-
values
public static GraphSemantic[] 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 (GraphSemantic c : GraphSemantic.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GraphSemantic valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getJakartaHintName
public String getJakartaHintName()
The corresponding Jakarta Persistence hint name.
-
getJpaHintName
@Deprecated(since="6.0") public String getJpaHintName()
Deprecated.UsegetJakartaHintName()
insteadThe hint name that should be used with Java Persistence.
-
fromHintName
public static GraphSemantic fromHintName(String hintName)
-
fromJpaHintName
@Deprecated(since="6.0") public static GraphSemantic fromJpaHintName(String hintName)
Deprecated.UsefromHintName(java.lang.String)
instead
-
-