public enum EntityLoadingCacheLookupStrategy extends Enum<EntityLoadingCacheLookupStrategy>
In most cases, no presence check is necessary.
| Enum Constant and Description |
|---|
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.
|
SKIP
When a search query returns entities,
do not check any cache
and load all the entities through an SQL query.
|
| Modifier and Type | Method and Description |
|---|---|
static EntityLoadingCacheLookupStrategy |
of(String value) |
static EntityLoadingCacheLookupStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EntityLoadingCacheLookupStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EntityLoadingCacheLookupStrategy SKIP
This is the default strategy.
public static final EntityLoadingCacheLookupStrategy PERSISTENCE_CONTEXT
public static final EntityLoadingCacheLookupStrategy PERSISTENCE_CONTEXT_THEN_SECOND_LEVEL_CACHE
public static EntityLoadingCacheLookupStrategy[] values()
for (EntityLoadingCacheLookupStrategy c : EntityLoadingCacheLookupStrategy.values()) System.out.println(c);
public static EntityLoadingCacheLookupStrategy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static EntityLoadingCacheLookupStrategy of(String value)
Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.