|
Dashboard Builder Commons 6.1.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dashboard.commons.filter.SQLFilterByCriteria
public class SQLFilterByCriteria
This helper class is addressed to be used by dynamic SQL generation custom algorithms. The main goal is to automate the generation of the SQL criteria part.
| Field Summary | |
|---|---|
protected FilterByCriteria |
filter
The filter to decorate. |
protected String |
sqlWildcard
The SQL wildcard. |
| Constructor Summary | |
|---|---|
SQLFilterByCriteria()
|
|
SQLFilterByCriteria(FilterByCriteria filter)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected FilterByCriteria filter
protected String sqlWildcard
| Constructor Detail |
|---|
public SQLFilterByCriteria()
public SQLFilterByCriteria(FilterByCriteria filter)
| Method Detail |
|---|
public String getSqlWildcard()
public String SQL_formatValue(Object value)
public String SQL_getWhereClause(String propertyId,
String propertySQLName)
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 boolean addProperty(String propertyId,
String filterCriteria)
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 List getPropertyAllowedValues(String propertyId)
public int getPropertyAllowMode(String propertyId)
public void setVariableName(String propertyId,
String varName)
public String getVariableName(String propertyId)
public void setExtraInfo(String propertyId,
String extraInfo)
public String getExtraInfo(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(String propertyId,
Object value)
public boolean pass(Object obj)
|
Dashboard Builder Commons 6.1.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||