public abstract class JRSqlAbstractInClause extends java.lang.Object implements JRClauseFunction
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CLAUSE_TRUISM |
protected static int |
POSITION_DB_COLUMN |
protected static int |
POSITION_PARAMETER |
Modifier | Constructor and Description |
---|---|
protected |
JRSqlAbstractInClause() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
appendInOperator(java.lang.StringBuffer sBuffer) |
void |
apply(JRClauseTokens clauseTokens,
JRQueryClauseContext queryContext)
Creates a (NOT) IN SQL clause.
|
protected void |
handleNoValues(JRQueryClauseContext queryContext) |
protected int |
valuesCount(java.lang.String paramName,
java.lang.Object paramValue) |
protected static final int POSITION_DB_COLUMN
protected static final int POSITION_PARAMETER
protected static final java.lang.String CLAUSE_TRUISM
public void apply(JRClauseTokens clauseTokens, JRQueryClauseContext queryContext)
The function expects two clause tokens (after the ID token):
java.util.Collection
or null
.
The function constructs a column [NOT] IN (?, ?, .., ?)
clause.
If the values list is null or empty, the function generates a SQL clause that
will always evaluate to true (e.g. 0 = 0
).
apply
in interface JRClauseFunction
clauseTokens
- the clause tokensqueryContext
- the query contextprotected void handleNoValues(JRQueryClauseContext queryContext)
protected int valuesCount(java.lang.String paramName, java.lang.Object paramValue)
protected abstract void appendInOperator(java.lang.StringBuffer sBuffer)
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com