public abstract class JRSqlAbstractInClause extends Object implements JRClauseFunction
The first token in the $X{...} syntax is the function ID token. Possible values for the (NOT) IN clause function ID token are:
INNOTIN| Modifier and Type | Field and Description |
|---|---|
protected static String |
CLAUSE_TRUISM |
static String |
EXCEPTION_MESSAGE_KEY_QUERY_IN_CLAUSE_DB_COLUMN_TOKEN_MISSING |
static String |
EXCEPTION_MESSAGE_KEY_QUERY_IN_CLAUSE_INVALID_PARAMETER_TYPE |
static String |
EXCEPTION_MESSAGE_KEY_QUERY_IN_CLAUSE_PARAMETER_TOKEN_MISSING |
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 |
appendAndOrOperator(StringBuffer sBuffer) |
protected abstract void |
appendInOperator(StringBuffer sBuffer) |
protected abstract void |
appendNullOperator(StringBuffer sBuffer) |
void |
apply(JRClauseTokens clauseTokens,
JRQueryClauseContext queryContext)
Creates a (NOT) IN SQL clause.
|
protected Collection<?> |
convert(String paramName,
Object paramValue) |
protected void |
handleNoValues(JRQueryClauseContext queryContext)
Generate a SQL clause that will always evaluate to true (e.g.
|
public static final String EXCEPTION_MESSAGE_KEY_QUERY_IN_CLAUSE_DB_COLUMN_TOKEN_MISSING
public static final String EXCEPTION_MESSAGE_KEY_QUERY_IN_CLAUSE_INVALID_PARAMETER_TYPE
public static final String EXCEPTION_MESSAGE_KEY_QUERY_IN_CLAUSE_PARAMETER_TOKEN_MISSING
protected static final int POSITION_DB_COLUMN
protected static final int POSITION_PARAMETER
protected static final 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 one of the following clauses:
<column_name> IN (?, ?, .., ?) clause(<column_name> IS NULL OR <column_name> IN (?, ?, .., ?)) clause<column_name> IS NULL clause<column_name> NOT IN (?, ?, .., ?) clause(<column_name> IS NOT NULL AND <column_name> NOT IN (?, ?, .., ?)) clause<column_name> IS NOT NULL clause0 = 0).apply in interface JRClauseFunctionclauseTokens - queryContext - protected void handleNoValues(JRQueryClauseContext queryContext)
0 = 0').queryContext - the query contextprotected Collection<?> convert(String paramName, Object paramValue)
paramName - the parameter nameparamValue - the parameter valuejava.util.Collection type object obtained either by converting an array to
a list or by a cast to java.util.Collection type.protected abstract void appendInOperator(StringBuffer sBuffer)
protected abstract void appendNullOperator(StringBuffer sBuffer)
protected abstract void appendAndOrOperator(StringBuffer sBuffer)
Copyright © 2017. All rights reserved.