Top Description Fields Constructors Methods
org.hibernate.jpa.internal.util

public final Class CacheModeHelper

extends Object
Class Inheritance
Imports
javax.persistence.CacheRetrieveMode, .CacheStoreMode, org.hibernate.CacheMode

Helper to deal with CacheMode <-> CacheRetrieveMode/CacheStoreMode conversions.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
public static final CacheMode
public static final CacheRetrieveMode
public static final CacheStoreMode

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CacheMode

Returns:

Corresponding CacheMode.
effectiveCacheMode
(CacheStoreMode
The JPA shared-cache store mode.
storeMode
,
CacheRetrieveMode
The JPA shared-cache retrieve mode.
retrieveMode
)

Given a JPA CacheStoreMode and CacheRetrieveMode, determine the corresponding legacy Hibernate CacheMode.

public static CacheMode

Returns:

Corresponding CacheMode.
interpretCacheMode
(CacheStoreMode
The JPA shared-cache store mode.
storeMode
,
CacheRetrieveMode
The JPA shared-cache retrieve mode.
retrieveMode
)

Given a JPA CacheStoreMode and CacheRetrieveMode, determine the corresponding legacy Hibernate CacheMode.

public static CacheRetrieveMode
public static CacheStoreMode
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_LEGACY_MODEback to summary
public static final CacheMode DEFAULT_LEGACY_MODE
DEFAULT_RETRIEVE_MODEback to summary
public static final CacheRetrieveMode DEFAULT_RETRIEVE_MODE
DEFAULT_STORE_MODEback to summary
public static final CacheStoreMode DEFAULT_STORE_MODE

Constructor Detail

CacheModeHelperback to summary
private CacheModeHelper()

Method Detail

effectiveCacheModeback to summary
public static CacheMode effectiveCacheMode(CacheStoreMode storeMode, CacheRetrieveMode retrieveMode)

Given a JPA CacheStoreMode and CacheRetrieveMode, determine the corresponding legacy Hibernate CacheMode.

Parameters
storeMode:CacheStoreMode

The JPA shared-cache store mode.

retrieveMode:CacheRetrieveMode

The JPA shared-cache retrieve mode.

Returns:CacheMode

Corresponding CacheMode.

interpretCacheModeback to summary
public static CacheMode interpretCacheMode(CacheStoreMode storeMode, CacheRetrieveMode retrieveMode)

Given a JPA CacheStoreMode and CacheRetrieveMode, determine the corresponding legacy Hibernate CacheMode.

Parameters
storeMode:CacheStoreMode

The JPA shared-cache store mode.

retrieveMode:CacheRetrieveMode

The JPA shared-cache retrieve mode.

Returns:CacheMode

Corresponding CacheMode.

interpretCacheRetrieveModeback to summary
public static CacheRetrieveMode interpretCacheRetrieveMode(CacheMode cacheMode)
interpretCacheStoreModeback to summary
public static CacheStoreMode interpretCacheStoreMode(CacheMode cacheMode)