org.hibernate.ejb.util
Class CacheModeHelper

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

public class CacheModeHelper
extends Object

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

Author:
Steve Ebersole

Field Summary
static CacheMode DEFAULT_LEGACY_MODE
           
static CacheRetrieveMode DEFAULT_RETRIEVE_MODE
           
static CacheStoreMode DEFAULT_STORE_MODE
           
 
Constructor Summary
CacheModeHelper()
           
 
Method Summary
static CacheMode interpretCacheMode(CacheStoreMode storeMode, CacheRetrieveMode retrieveMode)
          Given a JPA CacheStoreMode and CacheRetrieveMode, determine the corresponding legacy Hibernate CacheMode.
static CacheRetrieveMode interpretCacheRetrieveMode(CacheMode cacheMode)
           
static 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 CacheStoreMode DEFAULT_STORE_MODE

DEFAULT_RETRIEVE_MODE

public static final CacheRetrieveMode DEFAULT_RETRIEVE_MODE
Constructor Detail

CacheModeHelper

public CacheModeHelper()
Method Detail

interpretCacheMode

public static CacheMode interpretCacheMode(CacheStoreMode storeMode,
                                           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 CacheStoreMode interpretCacheStoreMode(CacheMode cacheMode)

interpretCacheRetrieveMode

public static CacheRetrieveMode interpretCacheRetrieveMode(CacheMode cacheMode)


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.