Enum Class EntityLoadingCacheLookupStrategy
java.lang.Object
java.lang.Enum<EntityLoadingCacheLookupStrategy>
org.hibernate.search.mapper.orm.search.loading.EntityLoadingCacheLookupStrategy
- All Implemented Interfaces:
Serializable
,Comparable<EntityLoadingCacheLookupStrategy>
,Constable
Strategy for cache lookup before search query results are loaded.
In most cases, no presence check is necessary.
- Author:
- Emmanuel Bernard
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWhen a search query returns entities, first check the persistence context to retrieve entities that are already in the session, then load the entities that were not found in the session through an SQL query.When a search query returns entities, first check the persistence context to retrieve entities that are already in the session, then check the second level cache to retrieve entities that are in the 2LC but not in the session, then load the entities that were not found in the session or 2LC through an SQL query.When a search query returns entities, do not check any cache and load all the entities through an SQL query. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static EntityLoadingCacheLookupStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SKIP
When a search query returns entities, do not check any cache and load all the entities through an SQL query.This is the default strategy.
-
PERSISTENCE_CONTEXT
When a search query returns entities, first check the persistence context to retrieve entities that are already in the session, then load the entities that were not found in the session through an SQL query. -
PERSISTENCE_CONTEXT_THEN_SECOND_LEVEL_CACHE
When a search query returns entities, first check the persistence context to retrieve entities that are already in the session, then check the second level cache to retrieve entities that are in the 2LC but not in the session, then load the entities that were not found in the session or 2LC through an SQL query.
-
-
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
-
of
-
externalRepresentation
- Returns:
- The expected string representation in configuration properties.
-