public abstract class JRSqlAbstractEqualClause extends Object implements JRClauseFunction
The first token in the $X{...} syntax is the function ID token. Possible values for the (NOT) EQUAL clause function ID token are:
Modifier and Type | Field and Description |
---|---|
static int |
POSITION_DB_COLUMN |
static int |
POSITION_PARAMETER |
Modifier | Constructor and Description |
---|---|
protected |
JRSqlAbstractEqualClause() |
Modifier and Type | Method and Description |
---|---|
void |
apply(JRClauseTokens clauseTokens,
JRQueryClauseContext queryContext)
Creates a (NOT) EQUAL SQL clause.
|
protected void |
finalizeClause(StringBuffer sbuffer,
String param,
JRQueryClauseContext queryContext)
Finalizes the query string
|
protected abstract void |
handleEqualOperator(StringBuffer sBuffer,
String param,
JRQueryClauseContext queryContext) |
public static final int POSITION_DB_COLUMN
public static final int POSITION_PARAMETER
public void apply(JRClauseTokens clauseTokens, JRQueryClauseContext queryContext)
The method expects two clause tokens (after the ID token):
The EQUAL function constructs either a column = ?
or an
column IS NULL
clause, depending on the parameter's value.
The NOTEQUAL function constructs either a column <> ?
or an
column IS NOT NULL
clause, depending on the parameter's value.
apply
in interface JRClauseFunction
clauseTokens
- the clause tokensqueryContext
- the query contextprotected void finalizeClause(StringBuffer sbuffer, String param, JRQueryClauseContext queryContext)
sbuffer
- param
- queryContext
- protected abstract void handleEqualOperator(StringBuffer sBuffer, String param, JRQueryClauseContext queryContext)
Copyright © 2015. All rights reserved.