public class SQLFilterByCriteria extends Object
Modifier and Type | Field and Description |
---|---|
protected FilterByCriteria |
filter
The filter to decorate.
|
protected String |
sqlWildcard
The SQL wildcard.
|
Constructor and Description |
---|
SQLFilterByCriteria() |
SQLFilterByCriteria(FilterByCriteria filter) |
Modifier and Type | Method and Description |
---|---|
void |
addProperty(String propertyId,
Object minValue,
boolean minValueIncluded,
Object maxValue,
boolean maxValueIncluded,
Collection allowedValues,
int allowMode) |
boolean |
addProperty(String propertyId,
String filterCriteria) |
boolean |
containsProperty(Collection propIds) |
boolean |
containsProperty(String propertyId) |
String |
getExtraInfo(String propertyId) |
String |
getGt() |
String |
getGtOrEq() |
Locale |
getLocale() |
String |
getLt() |
String |
getLtOrEq() |
List |
getPropertyAllowedValues(String propertyId) |
int |
getPropertyAllowMode(String propertyId) |
String[] |
getPropertyIds() |
Comparable |
getPropertyMaxValue(String propertyId) |
Comparable |
getPropertyMinValue(String propertyId) |
int |
getPropertyPriority(String propertyId) |
String |
getSqlWildcard() |
String |
getVariableName(String propertyId) |
String |
getWildcard() |
boolean |
maxValueIncluded(String propertyId) |
boolean |
minValueIncluded(String propertyId) |
boolean |
pass(Object obj) |
boolean |
pass(String propertyId,
Object value) |
void |
removeAllProperty() |
void |
removeProperty(String propertyId) |
void |
setExtraInfo(String propertyId,
String extraInfo) |
void |
setFilterCondition(String booleanExpression) |
void |
setLocale(Locale locale) |
void |
setVariableName(String propertyId,
String varName) |
String |
SQL_formatValue(Object value) |
String |
SQL_getWhereClause(boolean exclusive,
String[] propSQLClauses)
Get and SQL where clause composed of several single property SQL where clauses.
|
String |
SQL_getWhereClause(String propertyId,
String propertySQLName) |
String |
SQL_getWhereClause(String propertyId,
String sqlColumn,
boolean ignoreCase)
Retrieves the SQL condition that defines the contraints set for the given property.
|
List |
SQL_getWhereClause(String propertyId,
String sqlColumn,
boolean ignoreCase,
boolean forPreparedStatement)
Retrieves the SQL condition that defines the contraints set for the given property.
|
protected FilterByCriteria filter
protected String sqlWildcard
public SQLFilterByCriteria()
public SQLFilterByCriteria(FilterByCriteria filter)
public String getSqlWildcard()
public String SQL_getWhereClause(String propertyId, String sqlColumn, boolean ignoreCase)
propertyId
- The property identifier.sqlColumn
- The SQL literal identifying the property within the SQL query.ignoreCase
- In case on an String, case sentitiveness control.E.g: getSQLWhereClause(TEST_STRING, "p.testString")
might return "p.testString IN ('s1','s2')"
public List SQL_getWhereClause(String propertyId, String sqlColumn, boolean ignoreCase, boolean forPreparedStatement)
propertyId
- The property identifier.sqlColumn
- The SQL literal identifying the property within the SQL query.ignoreCase
- In case on an String, case sentitiveness control.forPreparedStatement
- The SQL fragment is generated to be used in a JDBC prepared statement.E.g: getPreparedStatementFragment(TEST_STRING, "p.testString", false, true)
might
return "(p.testString and p.testString>?) or p.testString=?"
public String SQL_getWhereClause(boolean exclusive, String[] propSQLClauses)
exclusive
- If true all the single property SQL criteria must be satisfied.propSQLClauses
- an array of SQL where clauses.public Locale getLocale()
public void setLocale(Locale locale)
public void addProperty(String propertyId, Object minValue, boolean minValueIncluded, Object maxValue, boolean maxValueIncluded, Collection allowedValues, int allowMode)
public String[] getPropertyIds()
public boolean containsProperty(String propertyId)
public boolean containsProperty(Collection propIds)
public void removeProperty(String propertyId)
public void removeAllProperty()
public int getPropertyPriority(String propertyId)
public Comparable getPropertyMinValue(String propertyId)
public boolean minValueIncluded(String propertyId)
public Comparable getPropertyMaxValue(String propertyId)
public boolean maxValueIncluded(String propertyId)
public int getPropertyAllowMode(String propertyId)
public void setFilterCondition(String booleanExpression)
public String getWildcard()
public String getGt()
public String getGtOrEq()
public String getLt()
public String getLtOrEq()
public boolean pass(Object obj)
Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.