public static class SQLStatementBuilder.DefaultSQLConditionValuesProcessor extends Object implements SQLStatementBuilder.SQLConditionValuesProcessor
SQLConditionValuesProcessor interface.| Modifier and Type | Field and Description |
|---|---|
protected SQLStatementHandler |
handler |
static String |
upperFunction |
protected boolean |
upperLike |
protected boolean |
upperStrings |
| Constructor and Description |
|---|
SQLStatementBuilder.DefaultSQLConditionValuesProcessor() |
SQLStatementBuilder.DefaultSQLConditionValuesProcessor(boolean upperLike)
Creates a
DefaultSQLConditionValuesProcessor where every
condition that uses LIKE is case-insensitive. |
SQLStatementBuilder.DefaultSQLConditionValuesProcessor(boolean upperStrings,
boolean upperLike)
Creates a
DefaultSQLConditionValuesProcessor where every
condition that uses LIKE or is a column of String type
is case-insensitive. |
| Modifier and Type | Method and Description |
|---|---|
String |
createQueryConditions(Hashtable conditions,
Vector wildcards,
Vector values)
Creates the condition string for a SQL Statement.
|
protected SQLStatementHandler |
getSQLStatementHandler() |
boolean |
getUpperLike() |
boolean |
getUpperStrings() |
protected static boolean |
hasParenthesis(String sqlquery)
Checks if the string contains a parenthesis
|
void |
setSQLStatementHandler(SQLStatementHandler handler) |
protected boolean upperLike
protected boolean upperStrings
public static String upperFunction
protected SQLStatementHandler handler
public SQLStatementBuilder.DefaultSQLConditionValuesProcessor()
public SQLStatementBuilder.DefaultSQLConditionValuesProcessor(boolean upperLike)
DefaultSQLConditionValuesProcessor where every
condition that uses LIKE is case-insensitive.
Inserts a upper function in both sides of LIKE
conditions (UPPER(Field) LIKE UPPER(Value))
upperLike - true if the LIKE condition should be case-insensitivepublic SQLStatementBuilder.DefaultSQLConditionValuesProcessor(boolean upperStrings,
boolean upperLike)
DefaultSQLConditionValuesProcessor where every
condition that uses LIKE or is a column of String type
is case-insensitive.
Inserts a upper function in both sides of LIKE
conditions (UPPER(Field) LIKE UPPER(Value)) Inserts a upper function
in both sides if column type is a String (UPPER(Field) LIKE
UPPER(String))
upperStrings - true if the String column type should be case-insensitiveupperLike - true if the LIKE condition should be case-insensitiveprotected SQLStatementHandler getSQLStatementHandler()
public void setSQLStatementHandler(SQLStatementHandler handler)
setSQLStatementHandler in interface SQLStatementBuilder.SQLConditionValuesProcessorprotected static boolean hasParenthesis(String sqlquery)
sqlquery - string to checkpublic String createQueryConditions(Hashtable conditions, Vector wildcards, Vector values)
createQueryConditions in interface SQLStatementBuilder.SQLConditionValuesProcessorconditions - a Hashtable specifying pairs of key-value corresponding to
the attribute (or column of a table in a database) and the
value that is formed by the condition.wildcards - column list that can use wildcardsvalues - vector where the value of each processed conditions is
storedpublic boolean getUpperLike()
getUpperLike in interface SQLStatementBuilder.SQLConditionValuesProcessorpublic boolean getUpperStrings()
getUpperStrings in interface SQLStatementBuilder.SQLConditionValuesProcessorCopyright © 2016 Imatia Innovation S.L.. All rights reserved.