Package org.opennms.web.alarm.filter
Class SituationFilter
- java.lang.Object
-
- org.opennms.web.alarm.filter.SituationFilter
-
-
Constructor Summary
Constructors Constructor Description SituationFilter(boolean situation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bindParam(PreparedStatement ps, int parameterIndex)
Binds the parameter values corresponding to the ? tokens in the string returned from getParamSql() to a prepared statement.boolean
equals(Object o)
org.hibernate.criterion.Criterion
getCriterion()
Criterion used to construction an OnmsCritieriaString
getDescription()
Returns a terse string (including a "=") that describes this filter in such a way to easily be included in an HTTP GET parameter.String
getParamSql()
Returns a parameterized SQL where clause.String
getSql()
Returns an expression for a SQL where clause.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.int
hashCode()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.web.filter.Filter
getTextDescriptionAsSanitizedHtml
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
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.
-
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 interfaceFilter
- 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 interfaceFilter
- Parameters:
ps
- aPreparedStatement
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 interfaceFilter
- 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 interfaceFilter
- 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 interfaceFilter
- Returns:
- A Criterion that represents a criteria restriction imposed by this filter
-
-