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.

Since:
1.8.1
Version:
$Id: $
Author:
ranger

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.

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:

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

Returns:
a String object.


Copyright © 2011. All Rights Reserved.