Package net.sf.basedb.clients.web.util
Class ProjectSpecificInfoFilter
- java.lang.Object
-
- net.sf.basedb.clients.web.util.ProjectSpecificInfoFilter
-
- All Implemented Interfaces:
Filter<AnnotationSnapshot>
public class ProjectSpecificInfoFilter extends Object implements Filter<AnnotationSnapshot>
Helper class for finding out information about about annotation snapshots returned byAnnotationLoaderUtil.findAll(net.sf.basedb.core.snapshot.AnnotationSetSnapshot, Filter)
method. This class will not filter the results, but only set flags if it finds a project-specific annotation that is overriding a default value.- Since:
- 3.11
- Author:
- nicklas
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
override
private boolean
projectSpecific
-
Constructor Summary
Constructors Constructor Description ProjectSpecificInfoFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluate(AnnotationSnapshot snapshot)
Evaluate the annotation snapshot and update the flags if the snapshot is a project-specific annotation and overrides a default value.boolean
hasProjectSpecificAnnotation()
Check if the project-specific flag is set.boolean
overridesDefaultAnnotation()
Check if the override flag is set.ProjectSpecificInfoFilter
reset()
Reset the flags to false.
-
-
-
Method Detail
-
evaluate
public boolean evaluate(AnnotationSnapshot snapshot)
Evaluate the annotation snapshot and update the flags if the snapshot is a project-specific annotation and overrides a default value.- Specified by:
evaluate
in interfaceFilter<AnnotationSnapshot>
- Parameters:
snapshot
- The object to evaluate- Returns:
- TRUE if the object passes the filter, FALSE otherwise
-
reset
public ProjectSpecificInfoFilter reset()
Reset the flags to false.- Returns:
- 'this' to allow for method chaining
-
hasProjectSpecificAnnotation
public boolean hasProjectSpecificAnnotation()
Check if the project-specific flag is set.
-
overridesDefaultAnnotation
public boolean overridesDefaultAnnotation()
Check if the override flag is set.
-
-