public class WhereCondition extends WhereConditionStd
for filtering using prepared statements
WhereConditionStd.AppendVariant
AND, EQUALS, GREATER, GREATER_EQUALS, IS_NOT_NULL, LIKE, LOWER, LOWER_EQUALS, NOT_EQUALS, OR, sqlDialect
Constructor and Description |
---|
WhereCondition()
Constructs a new where condition.
|
WhereCondition(DataObject dataObject)
Constructs a new where condition, prepared to comply to the SQL dialect given by
the specified DataObject class.
|
WhereCondition(DataObject dataObject,
NumericAttribute a,
int columnValue)
Constructs a new where condition, prepared to comply to the SQL dialect given by
the specified DataObject class.
|
Modifier and Type | Method and Description |
---|---|
void |
append(AbstractTextAttribute a,
java.lang.String columnValue)
Appends a condition fragment with automatic control of "equals" or "like".
|
void |
append(AbstractTextAttribute a,
java.lang.String relation,
java.lang.String columnValue)
Appends a condition fragment with automatic control of "equals" or "like".
|
void |
append(BooleanAttribute a,
boolean columnValue)
Appends a boolean condition fragment.
|
void |
append(DateAttribute a,
java.lang.String relation,
java.sql.Date dateToCompare)
Appends a date selection fragment to the where condition.
|
void |
append(int preferredCombination,
java.lang.String conditionFragement)
Appends a fragment to the where condition if not null and not an empty string.
|
void |
append(int combination,
java.lang.String columnName,
boolean b)
Appends a boolean condition fragment.
|
void |
append(int combination,
java.lang.String columnName,
boolean b,
DataObject dataObject)
Appends a boolean condition fragment.
|
void |
append(int combination,
java.lang.String columnName,
boolean b,
SqlDialect sqlDialect)
Appends a boolean condition fragment.
|
void |
append(int combination,
java.lang.String columnName,
java.sql.Date dateToCompare,
DataObject dataObject)
Appends a date selection fragment to the where condition.
|
void |
append(int combination,
java.lang.String columnName,
int columnValue)
Appends a condition fragment for a integer value.
|
void |
append(int preferredCombination,
java.lang.String preamble,
java.lang.String conditionFragement)
Appends a fragment to the where condition if not null and not an empty string.
|
void |
append(int combination,
java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare)
Appends a date selection fragment to the where condition.
|
void |
append(int combination,
java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare,
DataObject dataObject)
Appends a date selection fragment to the where condition.
|
void |
append(int combination,
java.lang.String columnName,
java.lang.String relation,
double columnValue)
Appends a condition fragment for a integer value.
|
void |
append(int combination,
java.lang.String columnName,
java.lang.String relation,
double columnValue,
boolean zeroAlsoNull)
Appends a condition fragment for a integer value.
|
void |
append(int combination,
java.lang.String columnName,
java.lang.String relation,
int columnValue)
Appends a condition fragment for a integer value.
|
void |
append(int combination,
java.lang.String columnName,
java.lang.String relation,
int columnValue,
boolean zeroAlsoNull)
Appends a condition fragment for a integer value.
|
void |
append(int combination,
java.lang.String preamble,
java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare)
Appends a date selection fragment to the where condition if not null and
not empty.
|
void |
append(int combination,
java.lang.String preamble,
java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare,
boolean treatNullDateValuesAsVeryEarly)
Appends a date selection fragment to the where condition if not null and
not empty.
|
void |
append(int combination,
java.lang.String preamble,
java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare,
DataObject dataObject)
Appends a date selection fragment to the where condition if not null and
not empty.
|
void |
append(int combination,
java.lang.String preamble,
java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare,
DataObject dataObject,
boolean treatNullDateValuesAsVeryEarly)
Appends a date selection fragment to the where condition if not null and
not empty.
|
void |
append(int combination,
java.lang.String preamble,
java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare,
SqlDialect sqlDialect)
Appends a date selection fragment to the where condition if not null and
not empty.
|
void |
append(int combination,
java.lang.String preamble,
java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare,
SqlDialect sqlDialect,
boolean treatNullDateValuesAsVeryEarly)
Appends a date selection fragment to the where condition if not null and
not empty.
|
void |
append(int combination,
java.lang.String preamble,
java.lang.String columnName,
java.lang.String relation,
double columnValue,
boolean zeroAlsoNull)
Appends a condition fragment for a double value.
|
void |
append(int combination,
java.lang.String preamble,
java.lang.String columnName,
java.lang.String relation,
java.lang.String columnValue,
boolean emptyAlsoNull)
Appends a condition fragment with automatic control of "equals" or "like".
|
void |
append(int combination,
java.lang.String preamble,
java.lang.String columnName,
java.lang.String relation,
java.sql.Timestamp timestampToCompare,
boolean treatNullDateValuesAsVeryEarly) |
void |
append(int combinationToUse,
WhereCondition anotherWhereCondition)
Adds another where condition to this where condition managing additional brackets if necessary.
|
void |
append(NumericAttribute a,
int columnValue)
Appends a condition fragment with automatic control of "equals" or "like".
|
void |
append(NumericAttribute a,
java.lang.String relation,
int columnValue)
Appends a condition fragment for a integer value.
|
void |
append(java.lang.String conditionFragement)
Appends a fragment to the where condition if not null and not an empty string.
|
void |
append(java.lang.String columnName,
boolean columnValue)
Appends a boolean condition fragment.
|
void |
append(java.lang.String columnName,
boolean b,
DataObject dataObject)
Appends a boolean condition fragment.
|
void |
append(java.lang.String columnName,
java.sql.Date dateToCompare,
DataObject dataObject)
Appends a date selection fragment to the where condition if not null and
not empty.
|
void |
append(java.lang.String columnName,
double columnValue)
Appends a condition fragment for a integer value.
|
void |
append(java.lang.String columnName,
int columnValue)
Appends a condition fragment.
|
void |
append(java.lang.String columnName,
int columnValue,
boolean zeroAlsoNull)
Appends a condition fragment for a integer value.
|
void |
append(java.lang.String columnName,
SearchContent searchContent) |
void |
append(java.lang.String columnName,
SearchContent searchContent,
WhereConditionStd.AppendVariant variant)
Appends to where condition has search content has content.
|
void |
append(java.lang.String columnName,
java.lang.String columnValue)
Appends a condition fragment with automatic control of "equals" or "like".
|
void |
append(java.lang.String columnName,
java.lang.String columnValue,
boolean emptyAlsoNull)
Appends a condition fragment with automatic control of "equals" or "like".
|
void |
append(java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare)
Appends a date selection fragment to the where condition.
|
void |
append(java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare,
DataObject dataObject)
Appends a date selection fragment to the where condition.
|
void |
append(java.lang.String columnName,
java.lang.String relation,
java.sql.Date dateToCompare,
DataObject dataObject,
boolean treatNullDateValuesAsVeryEarly)
Appends a date selection fragment to the where condition.
|
void |
append(java.lang.String columnName,
java.lang.String relation,
int columnValue)
Appends a condition fragment for a integer value.
|
void |
append(java.lang.String columnName,
java.lang.String relation,
java.lang.String columnValue)
Appends a condition fragment with automatic control of "equals" or "like".
|
void |
append(java.lang.String columnName,
java.lang.String relation,
java.sql.Timestamp timestampToCompare) |
void |
append(java.lang.String columnName,
java.lang.String columnValue,
WhereConditionStd.AppendVariant variant) |
void |
append(VarcharAttribute a,
SearchContent searchContent) |
void |
append(VarcharAttribute a,
java.lang.String columnValue)
Appends a condition fragment with automatic control of "equals" or "like".
|
void |
append(VarcharAttribute a,
java.lang.String columnValue,
WhereConditionStd.AppendVariant variant) |
void |
append(WhereCondition anotherWhereCondition)
Adds another where condition to this where condition managing additional brackets if necessary.
|
void |
appendContains(java.lang.String[] columns,
java.lang.String searchValue) |
void |
appendEntireWordSearch(java.lang.String columnName,
java.lang.String word) |
void |
appendEntireWordSearch(java.lang.String columnName,
java.lang.String word,
boolean orInsteadOfAnd) |
void |
appendEntireWordSearch(java.lang.String columnName,
java.lang.String word,
java.lang.String delimiters)
Appends a where-condition part searching for an expression as an entire word or word group separated by ';' or ','.
|
void |
appendEntireWordSearch(java.lang.String columnName,
java.lang.String word,
java.lang.String delimiters,
boolean orInsteadOfAnd)
Appends a where-condition part searching for an expression as an entire word or word group separated by ';' or ','.
|
void |
appendEqualsOrEmpty(java.lang.String columnName,
java.lang.String columnValue)
Appends a condition fragment searching for empty values or exact matching.
|
void |
appendEqualsOrEmptyAsOrCombination(java.lang.String columnName,
java.lang.String columnValue)
Appends a condition fragment searching for empty values or exact matching.
|
void |
appendLike(java.lang.String[] columns,
java.lang.String searchValue) |
void |
appendLike(java.lang.String[] columns,
java.lang.String searchValue,
boolean searchDateVariants) |
void |
appendLikeOrContains(java.lang.String[] columns,
java.lang.String searchValue) |
void |
appendLowerEqual(java.lang.String columnName,
java.sql.Date dateToCompare)
Appends a date lower equals condition fragment to the where condition if not null.
|
void |
appendLowerEqual(java.lang.String columnName,
java.sql.Date dateToCompare,
boolean treatNullDateValuesAsVeryEarly)
Appends a date lower equals condition fragment to the where condition if not null.
|
void |
appendLowerEqual(java.lang.String columnName,
java.sql.Date dateToCompare,
DataObject dataObject)
Appends a date lower equals condition fragment to the where condition if not null.
|
void |
appendLowerEqual(java.lang.String columnName,
java.sql.Date dateToCompare,
DataObject dataObject,
boolean treatNullDateValuesAsVeryEarly)
Appends a date lower equals condition fragment to the where condition if not null.
|
void |
appendOr(AbstractAttribute a,
java.lang.String columnValue)
Appends a condition fragment with automatic control of "equals" or "like"
- combination to previous fragments is 'or'.
|
void |
appendOr(java.lang.String conditionFragement)
Appends a fragment to the where condition if not null and not an empty string as OR condition.
|
void |
appendOr(java.lang.String columnName,
java.sql.Date dateToCompare)
Appends a date selection fragment to the where condition if not null and
not empty.
|
void |
appendOr(java.lang.String columnName,
int columnValue)
Appends a condition fragment.
|
void |
appendOr(java.lang.String columnName,
java.lang.String columnValue)
Appends a condition fragment with automatic control of "equals" or "like"
- combination to previous fragments is 'or'.
|
void |
appendOr(java.lang.String columnName,
java.lang.String relation,
java.lang.String columnValue)
Appends a condition fragment with automatic control of "equals" or "like"
- combination to previous fragments is 'or'.
|
void |
appendOr(WhereCondition anotherWhereCondition)
Adds another where condition to this where condition managing additional brackets if necessary as OR condition.
|
void |
closeBracket()
Closes the bracket by extending this where condition by ')'.
|
static java.lang.String |
getEntireWordCondition(java.lang.String columnName,
java.lang.String word,
java.lang.String delimiters)
Returns a where condition part searching for an expression as an entire word or word group separated by ';', ','.or '\n'
|
static java.lang.String |
getEntireWordCondition(java.lang.String columnName,
java.lang.String word,
java.lang.String delimiters,
boolean oracleIgnoreCase)
Returns a where condition part searching for an expression as an entire word or word group separated by ';', ','.or '\n'
|
static java.lang.String |
getEntireWordCondition(java.lang.String columnName,
java.lang.String word,
java.lang.String delimiters,
DataObject dataObject)
Returns a where condition part searching for an expression as an entire word or word group separated by ';', ','.or '\n'
|
static java.lang.String |
getEqualsFor(SqlDialect sqlDialect,
java.lang.String columnName)
Returns the appropriate SQL expression to test for equality.
|
static java.lang.String |
getEqualsIncludingCol(DataObject dataObject,
java.lang.String columnName) |
static java.lang.String |
getWhereFragement(DataObject dataObject,
java.lang.String columnName,
java.lang.String columnValue) |
void |
openBracket()
Opens a bracket.
|
void |
openBracketAsOrCombination()
Opens a bracket.
|
void |
setAutomaticAsteriskToPercent(boolean automaticAsteriskToPercent)
Sets automatic exchange from * to % on or off.
|
java.lang.String |
toString()
Returns the complete where condition as a string.
|
getColumnNameWoTablePrefix, getColumnType, getDayBeginDate, getDayEndingDate, getDefaultRelation, getNextDayBeginDate, isToCast, isToCast, isToUseUpperCase, isToUseUpperCase
public WhereCondition()
public WhereCondition(DataObject dataObject)
dataObject
- the DataObject class to refer to the SQL dialect to comply topublic WhereCondition(DataObject dataObject, NumericAttribute a, int columnValue)
dataObject
- the DataObject class to refer to the SQL dialect to comply toa
- the attribute containing name of the column to be usedcolumnValue
- the column value to be selectedpublic static java.lang.String getEntireWordCondition(java.lang.String columnName, java.lang.String word, java.lang.String delimiters)
columnName
- the name of the column to be searched inword
- the word or word group to be founddelimiters
- the chars separating one word from the otherpublic static java.lang.String getEntireWordCondition(java.lang.String columnName, java.lang.String word, java.lang.String delimiters, DataObject dataObject)
columnName
- the name of the column to be searched inword
- the word or word group to be founddelimiters
- the chars separating one word from the otherdataObject
- the DataObject class to refer to the SQL dialect to comply topublic static java.lang.String getEntireWordCondition(java.lang.String columnName, java.lang.String word, java.lang.String delimiters, boolean oracleIgnoreCase)
columnName
- the name of the column to be searched inword
- the word or word group to be founddelimiters
- the chars separating one word from the otheroracleIgnoreCase
- whether or not the expression has to be extended to provide ignore case searchpublic static java.lang.String getWhereFragement(DataObject dataObject, java.lang.String columnName, java.lang.String columnValue)
public static java.lang.String getEqualsIncludingCol(DataObject dataObject, java.lang.String columnName)
public static java.lang.String getEqualsFor(SqlDialect sqlDialect, java.lang.String columnName)
sqlDialect
- the SQL dialect to be supportedcolumnName
- the name of the column to check for equalitypublic void setAutomaticAsteriskToPercent(boolean automaticAsteriskToPercent)
automaticAsteriskToPercent
- whether or not * is automatically to be changed to %public void appendEqualsOrEmpty(java.lang.String columnName, java.lang.String columnValue)
columnName
- the name of the column to match the specified valuecolumnValue
- the column value to be selectedpublic void appendEqualsOrEmptyAsOrCombination(java.lang.String columnName, java.lang.String columnValue)
columnName
- the name of the column to match the specified valuecolumnValue
- the column value to be selectedpublic void append(VarcharAttribute a, SearchContent searchContent)
public void append(java.lang.String columnName, SearchContent searchContent)
public void append(java.lang.String columnName, SearchContent searchContent, WhereConditionStd.AppendVariant variant)
columnValue
- the column value to be selectedsearchContent
- the search content providing contentvariant
- the variant to append the condition fragmentpublic void append(AbstractTextAttribute a, java.lang.String columnValue)
a
- the attribute containing the column namecolumnValue
- the column value to be selectedpublic void append(VarcharAttribute a, java.lang.String columnValue)
a
- the attribute containing the column namecolumnValue
- the column value to be selectedpublic void append(VarcharAttribute a, java.lang.String columnValue, WhereConditionStd.AppendVariant variant)
public void append(java.lang.String columnName, java.lang.String columnValue, WhereConditionStd.AppendVariant variant)
public void append(java.lang.String columnName, java.lang.String columnValue)
columnName
- the name of the column to be usedcolumnValue
- the column value to be selectedpublic void appendOr(AbstractAttribute a, java.lang.String columnValue)
a
- the attribute containing the column namecolumnValue
- the column value to be selectedpublic void appendOr(java.lang.String columnName, java.lang.String columnValue)
columnName
- the name of the column to be usedcolumnValue
- the column value to be selectedpublic void appendOr(java.lang.String columnName, java.lang.String relation, java.lang.String columnValue)
columnName
- the name of the column to be usedrelation
- the relation to be used (e.g. =, <>)columnValue
- the column value to be selectedpublic void append(AbstractTextAttribute a, java.lang.String relation, java.lang.String columnValue)
a
- the attribute containing the column namerelation
- the relation to be used (e.g. =, <>)columnValue
- the column value to be selectedpublic void append(java.lang.String columnName, java.lang.String relation, java.lang.String columnValue)
columnName
- the name of the column to be usedrelation
- the relation to be used (e.g. =, <>)columnValue
- the column value to be selectedpublic void append(java.lang.String columnName, java.lang.String columnValue, boolean emptyAlsoNull)
columnName
- the name of the column to be usedcolumnValue
- the column value to be selectedemptyAlsoNull
- whether or not null values in database should
be treated in the same way as empty stringspublic void append(int combination, java.lang.String preamble, java.lang.String columnName, java.lang.String relation, java.lang.String columnValue, boolean emptyAlsoNull)
combination
- the index of the combination with previous condition fragmentspreamble
- the preamble to be placed before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - bracket may be closed automaticallycolumnName
- the column name to be used for the comparisonrelation
- the relation to be used (e.g. =, <>)columnValue
- the column value to be selectedemptyAlsoNull
- whether or not null values in database should
be treated in the same way as empty stringsWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(NumericAttribute a, int columnValue)
a
- the attribute containing the column namecolumnValue
- the column value to be selectedpublic void append(java.lang.String columnName, int columnValue)
columnName
- the name of the column to be usedcolumnValue
- the column value to be selectedpublic void appendOr(java.lang.String columnName, int columnValue)
columnName
- the name of the column to be usedcolumnValue
- the column value to be selectedpublic void append(java.lang.String columnName, int columnValue, boolean zeroAlsoNull)
columnName
- the name of the column to be usedcolumnValue
- the integer column value to be selectedzeroAlsoNull
- whether or not null values in database should be
treated in the same way as zero valuespublic void append(NumericAttribute a, java.lang.String relation, int columnValue)
a
- the attribute containing the column namerelation
- the relation to be used (e.g. =, <>)columnValue
- the numeric column value to selectWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(java.lang.String columnName, java.lang.String relation, int columnValue)
columnName
- the name of the column to be usedrelation
- the relation to be used (e.g. =, <>)columnValue
- the numeric column value to selectWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String columnName, int columnValue)
combination
- the index of the combination with previous condition fragmentscolumnName
- the name of the column to be usedcolumnValue
- the numeric column value to selectWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String columnName, java.lang.String relation, int columnValue)
combination
- the index of the combination with previous condition fragmentscolumnName
- the name of the column to be usedrelation
- the relation to be used (e.g. =, <>)columnValue
- the numeric column value to selectWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String columnName, java.lang.String relation, int columnValue, boolean zeroAlsoNull)
combination
- the index of the combination with previous condition fragmentscolumnName
- the name of the column to be usedrelation
- the relation to be used (e.g. =, <>)columnValue
- the numeric column value to selectzeroAlsoNull
- whether or not null values should be treated as zeroWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(java.lang.String columnName, double columnValue)
columnName
- the column name to be used for the comparisoncolumnValue
- the numeric column value to selectpublic void append(int combination, java.lang.String columnName, java.lang.String relation, double columnValue)
combination
- the index of the combination with previous condition fragmentscolumnName
- the column name to be used for the comparisonrelation
- the relation to be used (e.g. =, <>)columnValue
- the numeric column value to selectWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String columnName, java.lang.String relation, double columnValue, boolean zeroAlsoNull)
combination
- the index of the combination with previous condition fragmentscolumnName
- the column name to be used for the comparisonrelation
- the relation to be used (e.g. =, <>)columnValue
- the numeric column value to selectzeroAlsoNull
- whether or not null values should be treated as zeroWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String preamble, java.lang.String columnName, java.lang.String relation, double columnValue, boolean zeroAlsoNull)
combination
- the index of the combination with previous condition fragmentspreamble
- the preamble to be placed before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - bracket may be closed automaticallycolumnName
- the column name to be used for the comparisonrelation
- the relation to be used (e.g. =, <>)columnValue
- the numeric column value to selectzeroAlsoNull
- whether or not null values should be treated as zeroWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(BooleanAttribute a, boolean columnValue)
a
- the attribute containing the column namecolumnValue
- the column value to be selectedpublic void append(java.lang.String columnName, boolean columnValue)
columnName
- the name of the column to be usedcolumnValue
- the column value to be selectedpublic void append(java.lang.String columnName, boolean b, DataObject dataObject)
columnName
- the name of the column to be usedcolumnValue
- the column value to be selecteddataObject
- the data object to be used to define boolean comparisonpublic void append(int combination, java.lang.String columnName, boolean b)
combination
- the index of the combination with previous condition fragmentscolumnName
- the name of the column to be usedcolumnValue
- the column value to be selectedWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String columnName, boolean b, DataObject dataObject)
combination
- the index of the combination with previous condition fragmentscolumnName
- the name of the column to be usedcolumnValue
- the column value to be selecteddataObject
- the data object to be used to define boolean comparisonWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String columnName, boolean b, SqlDialect sqlDialect)
combination
- the index of the combination with previous condition fragmentscolumnName
- the name of the column to be usedcolumnValue
- the column value to be selectedsqlDialect
- the SQL dialect to be used to define boolean comparisonWhereConditionStd.AND
,
WhereConditionStd.OR
public void appendEntireWordSearch(java.lang.String columnName, java.lang.String word)
public void appendEntireWordSearch(java.lang.String columnName, java.lang.String word, boolean orInsteadOfAnd)
public void appendEntireWordSearch(java.lang.String columnName, java.lang.String word, java.lang.String delimiters)
columnName
- the name of the column to be searched inword
- the word or word group to be foundpublic void appendEntireWordSearch(java.lang.String columnName, java.lang.String word, java.lang.String delimiters, boolean orInsteadOfAnd)
columnName
- the name of the column to be searched inword
- the word or word group to be foundorInsteadOfAnd
- if true, this condition fragment is combined with 'or' instead of 'and' with existing former fragments.public void appendLikeOrContains(java.lang.String[] columns, java.lang.String searchValue)
public void appendLike(java.lang.String[] columns, java.lang.String searchValue)
public void appendLike(java.lang.String[] columns, java.lang.String searchValue, boolean searchDateVariants)
public void appendContains(java.lang.String[] columns, java.lang.String searchValue)
public void append(java.lang.String conditionFragement)
conditionFragement
- the condition fragmentpublic void appendOr(java.lang.String conditionFragement)
conditionFragement
- the condition fragmentpublic void append(int preferredCombination, java.lang.String conditionFragement)
preferredCombination
- the index of the preferred combination - the specified combination will be added automatically if the search fragment doesn't already contain a combination expression.conditionFragement
- the condition fragment to be added to this where conditionWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int preferredCombination, java.lang.String preamble, java.lang.String conditionFragement)
preferredCombination
- the index of the preferred combination - the specified combination will be added automatically if the search fragment doesn't already contain a combination expression.preamble
- the preamble to be placed before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - brackets may be closed automaticallyconditionFragement
- the condition fragment to be added to this where conditionWhereConditionStd.AND
,
WhereConditionStd.OR
public void appendLowerEqual(java.lang.String columnName, java.sql.Date dateToCompare)
columnName
- the name of the conditional date fielddateToCompare
- the date to comparepublic void appendLowerEqual(java.lang.String columnName, java.sql.Date dateToCompare, boolean treatNullDateValuesAsVeryEarly)
columnName
- the name of the conditional date fielddateToCompare
- the date to comparetreatNullDateValuesAsVeryEarly
- whether or not missing date values (null) should be treated as very earlypublic void appendLowerEqual(java.lang.String columnName, java.sql.Date dateToCompare, DataObject dataObject)
fieldName
- the name of the conditional date fielddateToCompare
- the date to comparedataObject
- the data object whose SQL dialect is to be satisfiedpublic void appendLowerEqual(java.lang.String columnName, java.sql.Date dateToCompare, DataObject dataObject, boolean treatNullDateValuesAsVeryEarly)
fieldName
- the name of the conditional date fielddateToCompare
- the date to comparedataObject
- the data object whose SQL dialect is to be satisfiedtreatNullDateValuesAsVeryEarly
- whether or not missing date values (null) should be treated as very earlypublic void append(java.lang.String columnName, java.sql.Date dateToCompare, DataObject dataObject)
columnName
- the column name to be used for the date comparisondateToCompare
- the date value to be compared with the columndataObject
- the data object to be used to format date comparisonpublic void appendOr(java.lang.String columnName, java.sql.Date dateToCompare)
columnName
- the column name to be used for the date comparisondateToCompare
- the date value to be compared with the columnpublic void append(java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare, DataObject dataObject)
columnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columndataObject
- the data object to be used to format date comparisonpublic void append(java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare, DataObject dataObject, boolean treatNullDateValuesAsVeryEarly)
columnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columndataObject
- the data object to be used to format date comparisontreatNullDateValuesAsVeryEarly
- whether or not missing date values (null) should be treated as very earlypublic void append(int combination, java.lang.String columnName, java.sql.Date dateToCompare, DataObject dataObject)
combination
- the index of the combination with previous condition fragmentscolumnName
- the column name to be used for the date comparisondateToCompare
- the date value to be compared with the columndataObject
- the data object to be used to format date comparisonWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(DateAttribute a, java.lang.String relation, java.sql.Date dateToCompare)
a
- the attribute containing the column namerelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columnpublic void append(java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare)
columnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columnpublic void append(int combination, java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare)
combination
- the index of the combination with previous condition fragmentscolumnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columnWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare, DataObject dataObject)
combination
- the index of the combination with previous condition fragmentscolumnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columndataObject
- the data object to be used to format date comparisonWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String preamble, java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare, DataObject dataObject)
combination
- the index of the combination with previous condition fragmentspreamble
- the preamble to be placed before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - bracket may be closed automaticallycolumnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columndataObject
- the data object to be used to format date comparisonWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String preamble, java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare, DataObject dataObject, boolean treatNullDateValuesAsVeryEarly)
combination
- the index of the combination with previous condition fragmentspreamble
- the preamble to be placed before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - bracket may be closed automaticallycolumnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columndataObject
- the data object to be used to format date comparisontreatNullDateValuesAsVeryEarly
- whether or not missing date values (null) should be treated as very earlyWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String preamble, java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare)
combination
- the index of the combination with previous condition fragmentspreamble
- the preamble to be placed before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - bracket may be closed automaticallycolumnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columnWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String preamble, java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare, boolean treatNullDateValuesAsVeryEarly)
combination
- the index of the combination with previous condition fragmentspreamble
- the preamble to be placed before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - bracket may be closed automaticallycolumnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columntreatNullDateValuesAsVeryEarly
- whether or not missing date values (null) should be treated as very earlyWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String preamble, java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare, SqlDialect sqlDialect)
combination
- the index of the combination with previous condition fragmentspreamble
- the preamble to be placed before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - bracket may be closed automaticallycolumnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columnsqlDialact
- the used SQL dialectWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(int combination, java.lang.String preamble, java.lang.String columnName, java.lang.String relation, java.sql.Date dateToCompare, SqlDialect sqlDialect, boolean treatNullDateValuesAsVeryEarly)
combination
- the index of the combination with previous condition fragmentspreamble
- the preamble to be placed before the search fragment to be constructed, e.g. "myID in (select foreignID from AnotherTable where " - bracket may be closed automaticallycolumnName
- the column name to be used for the date comparisonrelation
- the relation to be used (e.g. =, <>)dateToCompare
- the date value to be compared with the columnsqlDialact
- the used SQL dialecttreatNullDateValuesAsVeryEarly
- whether or not missing date values (null) should be treated as very earlyWhereConditionStd.AND
,
WhereConditionStd.OR
public void append(java.lang.String columnName, java.lang.String relation, java.sql.Timestamp timestampToCompare)
public void append(int combination, java.lang.String preamble, java.lang.String columnName, java.lang.String relation, java.sql.Timestamp timestampToCompare, boolean treatNullDateValuesAsVeryEarly)
public void append(WhereCondition anotherWhereCondition)
anotherWhereCondition
- the other where condition to appendpublic void appendOr(WhereCondition anotherWhereCondition)
anotherWhereCondition
- the other where condition to appendpublic void append(int combinationToUse, WhereCondition anotherWhereCondition)
combination
- the index of the combination with previous condition fragmentsanotherWhereCondition
- the other where condition to appendpublic void openBracket()
public void openBracketAsOrCombination()
public void closeBracket()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de