Package org.hibernate.boot.spi
Enum Class AccessType
- All Implemented Interfaces:
Serializable
,Comparable<AccessType>
,Constable
Enumerates various access strategies for accessing entity values.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic AccessType
getAccessStrategy
(AccessType type) Convert the JPA access type to the correspondingAccessType
value.static AccessType
getAccessStrategy
(String externalName) Resolve an externalized name to theAccessType
value it names.getType()
Retrieves the external name for this access typestatic AccessType
Returns the enum constant of this class with the specified name.static AccessType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Default access strategy is property -
PROPERTY
Access to value via property -
FIELD
Access to value via field -
RECORD
Access to value via record component accessor
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getType
Retrieves the external name for this access type- Returns:
- The external name
-
getAccessStrategy
Resolve an externalized name to theAccessType
value it names.- Parameters:
externalName
- The external name- Returns:
- The matching
AccessType
;DEFAULT
is returned rather thannull
-
getAccessStrategy
Convert the JPA access type to the correspondingAccessType
value.- Parameters:
type
- The JPA access type- Returns:
- The Hibernate
AccessType
-