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

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

The newest version!
package org.activiti.engine.impl.persistence;

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

import java.util.Collection;

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

 */
@Internal
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