com.github.inspektr.audit.support
Class AbstractWhereClauseMatchCriteria
java.lang.Object
com.github.inspektr.audit.support.AbstractWhereClauseMatchCriteria
- All Implemented Interfaces:
- WhereClauseMatchCriteria
- Direct Known Subclasses:
- MaxAgeWhereClauseMatchCriteria, NoMatchWhereClauseMatchCriteria
public abstract class AbstractWhereClauseMatchCriteria
- extends Object
- implements WhereClauseMatchCriteria
Match criteria defined in terms of a SQL where clause limiter. The
toString() method of this class produces a where clause beginning
with the text "WHERE" such that is can be directly appended to a SQL
statement without a where clause to narrow results.
- Since:
- 1.0
- Version:
- $Revision: $
- Author:
- Marvin S. Addison
|
Method Summary |
protected void |
addCriteria(String column)
Adds a parameterized selection criterion of the form column=? to the
where clause. |
protected void |
addCriteria(String column,
String operator)
Adds a parameterized selection criterion of the form "column [operator] ?"
to the where clause. |
String |
toString()
|
sbClause
protected StringBuilder sbClause
- Stores where clause string
AbstractWhereClauseMatchCriteria
public AbstractWhereClauseMatchCriteria()
toString
public String toString()
- Specified by:
toString in interface WhereClauseMatchCriteria- Overrides:
toString in class Object
- Returns:
- The where clause text beginning with the string " WHERE" such that
the return value can be directly appended to a SQL statement with no
where clause.
addCriteria
protected void addCriteria(String column)
- Adds a parameterized selection criterion of the form column=? to the
where clause.
- Parameters:
column - Database column name.
addCriteria
protected void addCriteria(String column,
String operator)
- Adds a parameterized selection criterion of the form "column [operator] ?"
to the where clause.
- Parameters:
column - Database column name.operator - the operator to use to separate.
Copyright © 2007-2011 Rutgers, the State University of New Jersey. All Rights Reserved.