public abstract class JRSqlAbstractEqualClause extends java.lang.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 java.lang.String |
EXCEPTION_MESSAGE_KEY_QUERY_EQUAL_CLAUSE_DB_COLUMN_TOKEN_MISSING |
static java.lang.String |
EXCEPTION_MESSAGE_KEY_QUERY_EQUAL_CLAUSE_PARAMETER_TOKEN_MISSING |
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(java.lang.StringBuffer sbuffer,
java.lang.String param,
JRQueryClauseContext queryContext)
Finalizes the query string
|
protected abstract void |
handleEqualOperator(java.lang.StringBuffer sBuffer,
java.lang.String param,
JRQueryClauseContext queryContext) |
public static final java.lang.String EXCEPTION_MESSAGE_KEY_QUERY_EQUAL_CLAUSE_DB_COLUMN_TOKEN_MISSING
public static final java.lang.String EXCEPTION_MESSAGE_KEY_QUERY_EQUAL_CLAUSE_PARAMETER_TOKEN_MISSING
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(java.lang.StringBuffer sbuffer, java.lang.String param, JRQueryClauseContext queryContext)
sbuffer
- param
- queryContext
- protected abstract void handleEqualOperator(java.lang.StringBuffer sBuffer, java.lang.String param, JRQueryClauseContext queryContext)
© 2001-2014 TIBCO Software Inc. www.jaspersoft.com