Class SituationFilter

  • All Implemented Interfaces:
    Filter

    public class SituationFilter
    extends Object
    implements Filter
    • Constructor Detail

      • SituationFilter

        public SituationFilter​(boolean situation)
    • Method Detail

      • getSql

        public String getSql()
        Description copied from interface: Filter
        Returns an expression for a SQL where clause. Remember to include a trailing space, but no leading AND or OR.
        Specified by:
        getSql in interface Filter
        Returns:
        a String object.
      • getParamSql

        public String getParamSql()
        Description copied from interface: Filter
        Returns a parameterized SQL where clause. Remember to include a trailing space, but no leading AND or OR.
        Specified by:
        getParamSql in interface Filter
        Returns:
        a String object.
      • bindParam

        public int bindParam​(PreparedStatement ps,
                             int parameterIndex)
                      throws SQLException
        Description copied from interface: Filter
        Binds the parameter values corresponding to the ? tokens in the string returned from getParamSql() to a prepared statement. Returns the number of parameters that were bound.
        Specified by:
        bindParam in interface Filter
        Parameters:
        ps - a PreparedStatement object.
        parameterIndex - a int.
        Returns:
        a int.
        Throws:
        SQLException - if any.
      • getDescription

        public String getDescription()
        Description copied from interface: Filter
        Returns a terse string (including a "=") that describes this filter in such a way to easily be included in an HTTP GET parameter.

        Some examples:

        • "node=1"
        • "interface=192.168.0.1"
        • "severity=3"
        • "nodenamelike=opennms"

        Specified by:
        getDescription in interface Filter
        Returns:
        a String object.
      • getTextDescription

        public String getTextDescription()
        Description copied from interface: Filter
        Returns a terse but human-readable string describing this filter in such a way to easily be included in a search results list.

        Some examples (corresponding to the examples in getDescription):

        • "node=nodelabel_of_node_1"
        • "interface=192.168.0.1"
        • "severity=Normal"
        • "node name containing \"opennms\""

        Specified by:
        getTextDescription in interface Filter
        Returns:
        a String object.
      • getCriterion

        public org.hibernate.criterion.Criterion getCriterion()
        Description copied from interface: Filter
        Criterion used to construction an OnmsCritieria
        Specified by:
        getCriterion in interface Filter
        Returns:
        A Criterion that represents a criteria restriction imposed by this filter
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object