Interface Filter

    • Method Detail

      • getSql

        String getSql()
        Returns an expression for a SQL where clause. Remember to include a trailing space, but no leading AND or OR.
        Returns:
        a String object.
      • getParamSql

        String getParamSql()
        Returns a parameterized SQL where clause. Remember to include a trailing space, but no leading AND or OR.
        Returns:
        a String object.
      • bindParam

        int bindParam​(PreparedStatement ps,
                      int parameterIndex)
               throws SQLException
        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.
        Parameters:
        ps - a PreparedStatement object.
        parameterIndex - a int.
        Returns:
        a int.
        Throws:
        SQLException - if any.
      • getDescription

        String getDescription()
        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"

        Returns:
        a String object.
      • getTextDescription

        String getTextDescription()
        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\""

        Returns:
        a String object.
      • getTextDescriptionAsSanitizedHtml

        default String getTextDescriptionAsSanitizedHtml()
        Returns a similar text as getTextDescription() but can contain html elements. The implementor is responsible to make sure no cross side scripting can occur.
      • getCriterion

        org.hibernate.criterion.Criterion getCriterion()
        Criterion used to construction an OnmsCritieria
        Returns:
        A Criterion that represents a criteria restriction imposed by this filter