Interface CachedEntityMatcher<EntityImpl extends Entity>

    • Method Detail

      • isRetained

        boolean isRetained​(java.util.Collection<EntityImpl> databaseEntities,
                           java.util.Collection<CachedEntity> cachedEntities,
                           EntityImpl entity,
                           java.lang.Object param)
        Returns true if an entity from the cache should be retained (i.e. used as return result for a query). Most implementations of this interface probably don't need this method, and should extend the simpler CachedEntityMatcherAdapter, which hides this method. Note that the databaseEntities collection can be null, in case only the cache is checked.