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 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 Details

    • projectSpecific

      private boolean projectSpecific
    • override

      private boolean override
  • Constructor Details

    • ProjectSpecificInfoFilter

      public ProjectSpecificInfoFilter()
  • Method Details

    • 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 interface Filter<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.