com.taggercat.model
Class AutoFilterWhereClause
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<java.lang.String,java.lang.Object>
com.taggercat.model.AutoFilterWhereClause
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>
public class AutoFilterWhereClause
- extends java.util.HashMap<java.lang.String,java.lang.Object>
- implements java.io.Serializable
This class is used to manage "Auto-Filter" portions of Criteria where clauses. The
auto-filter where clause functionality is similar to the auto filter
functionality in MS Excel. The user firsts selects a column, and is the
presented with a selection list of the distinct values in that column. The
user can then select one or more distinct values to add to the filter.
Filtering on another column is cumulative. The result of this is a HQL where
clause for all the selected values for the specified columns. The two HQL
operators: IS NULL and IS NOT NULL are supported. However, for string values
IS NULL means IS NULL or property = '' and IS NOT NULL means IS NOT NULL and property <> ''.
- See Also:
- Serialized Form
-
| Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
|
Method Summary |
boolean |
add(java.lang.String columName,
java.lang.String[] values)
Adds a column to the where clause. |
void |
addCriterion(DataSource ds,
org.hibernate.criterion.Disjunction orCondition,
java.lang.String propertyName,
java.lang.String strValue,
java.lang.String propType)
This method is a near copy of the addCriteriaValue() method the DataSource class,
Duplicating this code is a horrible hack for now. |
void |
addRestrictions(DataSource ds,
org.hibernate.criterion.DetachedCriteria criteria)
|
java.lang.String |
getFilterStringForDisplay(java.lang.String columName)
|
java.lang.String |
toString()
|
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
AutoFilterWhereClause
public AutoFilterWhereClause()
add
public boolean add(java.lang.String columName,
java.lang.String[] values)
- Adds a column to the where clause.
- Parameters:
columName - the column name to add.
- Returns:
- values the values to add
toString
public java.lang.String toString()
- Overrides:
toString in class java.util.AbstractMap<java.lang.String,java.lang.Object>
getFilterStringForDisplay
public java.lang.String getFilterStringForDisplay(java.lang.String columName)
addRestrictions
public void addRestrictions(DataSource ds,
org.hibernate.criterion.DetachedCriteria criteria)
throws PropertyValueException
- Throws:
PropertyValueException
addCriterion
public void addCriterion(DataSource ds,
org.hibernate.criterion.Disjunction orCondition,
java.lang.String propertyName,
java.lang.String strValue,
java.lang.String propType)
throws PropertyValueException
- This method is a near copy of the addCriteriaValue() method the DataSource class,
Duplicating this code is a horrible hack for now.
- Throws:
PropertyValueException- Parameters:
orCondition - propertyName - strValue -