All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.activiti.engine.impl.persistence.CachedEntityMatcher Maven / Gradle / Ivy

package org.activiti.engine.impl.persistence;

import java.util.Collection;

import org.activiti.engine.impl.persistence.cache.CachedEntity;
import org.activiti.engine.impl.persistence.entity.Entity;

/**
 * Interface to express a condition whether or not a cached entity should be used in the return result of a query.
 * 

 */
public interface CachedEntityMatcher {

  /**
   * 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 {@link CachedEntityMatcherAdapter}, which hides this method.
   * 
   * Note that the databaseEntities collection can be null, in case only the cache is checked.
   */
  boolean isRetained(Collection databaseEntities, Collection cachedEntities, EntityImpl entity, Object param);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy