Package net.sf.basedb.clients.web.util
Class ProjectSpecificInfoFilter
java.lang.Object
net.sf.basedb.clients.web.util.ProjectSpecificInfoFilter
- All Implemented Interfaces:
Filter<AnnotationSnapshot>
Helper class for finding out information about about
annotation snapshots returned by
AnnotationLoaderUtil.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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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
Check if the project-specific flag is set.boolean
Check if the override flag is set.reset()
Reset the flags to false.
-
Field Details
-
projectSpecific
private boolean projectSpecific -
override
private boolean override
-
-
Constructor Details
-
ProjectSpecificInfoFilter
public ProjectSpecificInfoFilter()
-
-
Method Details
-
evaluate
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
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.
-