Top Description Fields Constructors Methods
jakarta.persistence

public final Enum CacheRetrieveMode

extends Enum<CacheRetrieveMode>
implements FindOption
Class Inheritance
All Implemented Interfaces
jakarta.persistence.FindOption

Specifies how the EntityManager interacts with the second-level cache when data is read from the database via the EntityManager#find methods and execution of queries.

Enumerates legal values of the property jakarta.persistence.cache.retrieveMode.

Since
2.0
See Also
EntityManager#setCacheRetrieveMode(CacheRetrieveMode), Query#setCacheRetrieveMode(CacheRetrieveMode)

Field Summary

Modifier and TypeField and Description
public static final CacheRetrieveMode
BYPASS

Bypass the cache: get data directly from the database.

public static final CacheRetrieveMode
USE

Read entity data from the cache: this is the default behavior.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CacheRetrieveMode
public static CacheRetrieveMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BYPASSback to summary
public static final CacheRetrieveMode BYPASS

Bypass the cache: get data directly from the database.

USEback to summary
public static final CacheRetrieveMode USE

Read entity data from the cache: this is the default behavior.

Constructor Detail

CacheRetrieveModeback to summary
private CacheRetrieveMode()

Method Detail

valueOfback to summary
public static CacheRetrieveMode valueOf(String name)
valuesback to summary
public static CacheRetrieveMode[] values()