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 FETCHIndicates that anEntityGraphshould be interpreted as a JPA "fetch graph".LOADIndicates that anEntityGraphshould 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 GraphSemanticfromHintName(String hintName)static GraphSemanticfromJpaHintName(String hintName)Deprecated.UsefromHintName(java.lang.String)insteadStringgetJakartaHintName()The corresponding Jakarta Persistence hint name.StringgetJpaHintName()Deprecated.UsegetJakartaHintName()insteadstatic GraphSemanticvalueOf(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 anEntityGraphshould be interpreted as a JPA "fetch graph".- Attributes explicitly specified using an
AttributeNodes are treated asFetchType.EAGERand fetched via a join or subsequent select. - Attributes not explicitly specified are treated as
FetchType.LAZYand are not fetched.
- Attributes explicitly specified using an
-
LOAD
public static final GraphSemantic LOAD
Indicates that anEntityGraphshould be interpreted as a JPA "load graph".- Attributes explicitly specified using an
AttributeNodes are treated asFetchType.EAGERand fetched via a join or subsequent select. - Attributes not explicitly specified are treated as
FetchType.LAZYorFetchType.EAGERdepending 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
-
-