Package org.hibernate.annotations
Enum LazyToOneOption
- All Implemented Interfaces:
Serializable,Comparable<LazyToOneOption>,java.lang.constant.Constable
Lazy options available for a ToOne association
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptioneagerly load the associationLazy, give back the real object loaded when a reference is requested (Bytecode enhancement is mandatory for this option, fall back to PROXY if the class is not enhanced) This option should be avoided unless you can't afford the use of proxiesLazy, give back a proxy which will be loaded when the state is requested This should be the prefered option -
Method Summary
Modifier and TypeMethodDescriptionstatic LazyToOneOptionReturns the enum constant of this type with the specified name.static LazyToOneOption[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
FALSE
eagerly load the association -
PROXY
Lazy, give back a proxy which will be loaded when the state is requested This should be the prefered option -
NO_PROXY
Lazy, give back the real object loaded when a reference is requested (Bytecode enhancement is mandatory for this option, fall back to PROXY if the class is not enhanced) This option should be avoided unless you can't afford the use of proxies
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-