org.hibernate.ejb.util
Class CacheModeHelper

java.lang.Object
  extended by org.hibernate.ejb.util.CacheModeHelper

public class CacheModeHelper
extends java.lang.Object

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

Author:
Steve Ebersole

Field Summary
static CacheMode DEFAULT_LEGACY_MODE
           
static javax.persistence.CacheRetrieveMode DEFAULT_RETRIEVE_MODE
           
static javax.persistence.CacheStoreMode DEFAULT_STORE_MODE
           
 
Constructor Summary
CacheModeHelper()
           
 
Method Summary
static CacheMode interpretCacheMode(javax.persistence.CacheStoreMode storeMode, javax.persistence.CacheRetrieveMode retrieveMode)
          Given a JPA CacheStoreMode and CacheRetrieveMode, determine the corresponding legacy Hibernate CacheMode.
static javax.persistence.CacheRetrieveMode interpretCacheRetrieveMode(CacheMode cacheMode)
           
static javax.persistence.CacheStoreMode interpretCacheStoreMode(CacheMode cacheMode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LEGACY_MODE

public static final CacheMode DEFAULT_LEGACY_MODE

DEFAULT_STORE_MODE

public static final javax.persistence.CacheStoreMode DEFAULT_STORE_MODE

DEFAULT_RETRIEVE_MODE

public static final javax.persistence.CacheRetrieveMode DEFAULT_RETRIEVE_MODE
Constructor Detail

CacheModeHelper

public CacheModeHelper()
Method Detail

interpretCacheMode

public static CacheMode interpretCacheMode(javax.persistence.CacheStoreMode storeMode,
                                           javax.persistence.CacheRetrieveMode retrieveMode)
Given a JPA CacheStoreMode and CacheRetrieveMode, determine the corresponding legacy Hibernate CacheMode.

Parameters:
storeMode - The JPA shared-cache store mode.
retrieveMode - The JPA shared-cache retrieve mode.
Returns:
Corresponding CacheMode.

interpretCacheStoreMode

public static javax.persistence.CacheStoreMode interpretCacheStoreMode(CacheMode cacheMode)

interpretCacheRetrieveMode

public static javax.persistence.CacheRetrieveMode interpretCacheRetrieveMode(CacheMode cacheMode)


Copyright © 2012. All Rights Reserved.