Package org.opennms.web.filter
Class OneArgFilter<T>
- java.lang.Object
-
- org.opennms.web.filter.BaseFilter<T>
-
- org.opennms.web.filter.OneArgFilter<T>
-
- All Implemented Interfaces:
Filter
- Direct Known Subclasses:
CategoryFilter
,EqualsFilter
,EqualsFilterNullAware
,EventParmLikeFilter
,GreaterThanFilter
,IPLikeFilter
,LessThanFilter
,LikeFilter
,NegativeEventParmLikeFilter
,NoSubstringFilter
,NotEqualOrNullFilter
,NotEqualsFilter
,NotEqualsFilterNullAware
,RecentOutagesFilter
,SubstringFilter
,UserFilter
public abstract class OneArgFilter<T> extends BaseFilter<T>
OneArgFilter- Since:
- 1.8.1
- Version:
- $Id: $
- Author:
- brozow
-
-
Field Summary
-
Fields inherited from class org.opennms.web.filter.BaseFilter
m_filterName, m_sqlType
-
-
Method Summary
All Methods Instance Methods Abstract 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.T
getBoundValue(T value)
getBoundValueString
getParamSql()
getParamSqlString
getSql()
getSqlabstract String
getSQLTemplate()
getSQLTemplateString
getTextDescription()
getTextDescriptionT
getValue()
getValueString
getValueString()
getValueString-
Methods inherited from class org.opennms.web.filter.BaseFilter
bindValue, formatValue, getCriterion, getDescription, getPropertyName, getSQLFieldName, getValueAsString, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opennms.web.filter.Filter
getTextDescriptionAsSanitizedHtml
-
-
-
-
Method Detail
-
getValue
public final T getValue()
getValue
- Returns:
- a T object.
-
getBoundValue
public T getBoundValue(T value)
getBoundValue
- Parameters:
value
- a T object.- Returns:
- a T object.
-
bindParam
public final 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.- Specified by:
bindParam
in interfaceFilter
- Specified by:
bindParam
in classBaseFilter<T>
- Parameters:
ps
- aPreparedStatement
object.parameterIndex
- a int.- Returns:
- a int.
- Throws:
SQLException
- if any.
-
getValueString
public final String getValueString()
getValueString
- Specified by:
getValueString
in classBaseFilter<T>
- Returns:
- a
String
object.
-
getParamSql
public final String getParamSql()
getParamSql
- Specified by:
getParamSql
in interfaceFilter
- Specified by:
getParamSql
in classBaseFilter<T>
- Returns:
- a
String
object.
-
getSql
public final String getSql()
getSql
-
getTextDescription
public String getTextDescription()
Description copied from class:BaseFilter
getTextDescription
- Specified by:
getTextDescription
in interfaceFilter
- Specified by:
getTextDescription
in classBaseFilter<T>
- Returns:
- a
String
object.
-
-