org.opennms.web.vulnerability.filter
Interface Filter

All Known Implementing Classes:
CreationDateAfterFilter, CreationDateBeforeFilter, InterfaceFilter, IPLikeFilter, NegativeInterfaceFilter, NegativeNodeFilter, NegativePortFilter, NegativeProtocolFilter, NegativeSeverityFilter, NodeFilter, NodeNameLikeFilter, PortFilter, ProtocolFilter, ResolvedDateAfterFilter, ResolvedDateBeforeFilter, SeverityFilter

public interface Filter

Convenience class to determine what sort of events to include in a query.


Method Summary
 int bindParam(PreparedStatement ps, int parameterIndex)
          Binds the parameter values corresponding to the ? tokens in the string returned from getParamSql() to a prepared statement.
 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.
 String getParamSql()
          Returns a parameterized SQL where clause.
 String getSql()
          Returns an expresions 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.
 

Method Detail

getSql

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


getParamSql

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


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.

Throws:
SQLException

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:


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):



Copyright © 2009. All Rights Reserved.