Class CacheModeHelper


  • public final class CacheModeHelper
    extends Object
    Helper to deal with CacheMode <-> CacheRetrieveMode/CacheStoreMode conversions.
    • Field Detail

      • DEFAULT_LEGACY_MODE

        public static final CacheMode DEFAULT_LEGACY_MODE
      • DEFAULT_STORE_MODE

        public static final jakarta.persistence.CacheStoreMode DEFAULT_STORE_MODE
      • DEFAULT_RETRIEVE_MODE

        public static final jakarta.persistence.CacheRetrieveMode DEFAULT_RETRIEVE_MODE
    • Method Detail

      • interpretCacheMode

        public static CacheMode interpretCacheMode​(jakarta.persistence.CacheStoreMode storeMode,
                                                   jakarta.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.
      • effectiveCacheMode

        public static CacheMode effectiveCacheMode​(jakarta.persistence.CacheStoreMode storeMode,
                                                   jakarta.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 jakarta.persistence.CacheStoreMode interpretCacheStoreMode​(CacheMode cacheMode)
      • interpretCacheRetrieveMode

        public static jakarta.persistence.CacheRetrieveMode interpretCacheRetrieveMode​(CacheMode cacheMode)