Class DbEntityCacheKeyMapping

  • public class DbEntityCacheKeyMapping
    extends java.lang.Object
    Provides the keys used by DbEntityCache for organizing the different DbEntity types. Especially for polymorphic types, it is important that they are accessible in the cache under one common key such that querying the cache with a superclass or with a subclass both return the cached entities.
    Thorben Lindhauer
    • Field Detail

      • entityCacheKeys

        protected java.util.Map<java.lang.Class<?>,​java.lang.Class<?>> entityCacheKeys
    • Constructor Detail

      • DbEntityCacheKeyMapping

        public DbEntityCacheKeyMapping()
    • Method Detail

      • getEntityCacheKey

        public java.lang.Class<?> getEntityCacheKey​(java.lang.Class<?> entityType)
      • registerEntityCacheKey

        public void registerEntityCacheKey​(java.lang.Class<?> entityType,
                                           java.lang.Class<?> cacheKey)