Package net.sf.basedb.core.snapshot
Class ProjectFilter
java.lang.Object
net.sf.basedb.core.snapshot.ProjectFilter
- All Implemented Interfaces:
Filter<AnnotationSnapshot>
public class ProjectFilter extends Object implements Filter<AnnotationSnapshot>
Filter implementation that finds all annotation snapshots
for a given set of projects. Intended to be used with
SnapshotManager.findAnnotations(DbControl, AnnotationSetSnapshot, Filter, boolean)
when the manager is in the "all projects" mode. In other modes, the snapshot manager will
select only the default values, or project-specific values for the currently active project.
See SnapshotManager.setAllProjects()
, SnapshotManager.setProject(Project)
and SnapshotManager.setNoProject()
.- Version:
- 3.19.4
- Author:
- Nicklas
- Last modified
- $Date$
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ProjectFilter(Collection<Integer> projects)
Create a filter that matches the given projects ID values.ProjectFilter(Collection<Project> projects, boolean includeDefaultValues)
Create a filter that matches the given projects and optionally default values.ProjectFilter(DbControl dc)
Create a filter that matches all projects that the current user has access to including the default values. -
Method Summary
Modifier and Type Method Description boolean
evaluate(AnnotationSnapshot snapshot)
Evaluate if the given object should pass the filter or not.
-
Field Details
-
projects
-
-
Constructor Details
-
ProjectFilter
Create a filter that matches all projects that the current user has access to including the default values. -
ProjectFilter
Create a filter that matches the given projects and optionally default values. -
ProjectFilter
Create a filter that matches the given projects ID values. To match default values make sure that '0' is included in the given values.
-
-
Method Details
-
evaluate
Description copied from interface:Filter
Evaluate if the given object should pass the filter or not.- Specified by:
evaluate
in interfaceFilter<AnnotationSnapshot>
- Parameters:
snapshot
- The object to evaluate- Returns:
- TRUE if the object passes the filter, FALSE otherwise
-