public Object getFilterValue(Filter filter) {
   switch (columnType) {
     case INTEGER:
       return Integer.valueOf(filter.getValue());
     case STRING:
       return filter.getValue();
     case DATE:
       return DateUtil.convert(filter.getValue());
     default:
       return null; // will not happen
   }
 }
  public Criteria execute(Criteria criteria) {
    for (Filter filter : filters) {
      buildCriteria(criteria, filter.getProperty(), filter.getValue());
    }

    return criteria;
  }
 public String execute(String criteria) {
   String theCriteria = "";
   for (Filter filter : filters) {
     theCriteria += buildCriteria(criteria, filter.getProperty(), filter.getValue());
   }
   return theCriteria;
 }
 /**
  * Gets the filter hash of the FilterSet.
  *
  * @return The hash of the tokens and values for quick lookup.
  */
 public synchronized Hashtable getFilterHash() {
   if (filterHash == null) {
     filterHash = new Hashtable(getFilters().size());
     for (Enumeration e = getFilters().elements(); e.hasMoreElements(); ) {
       Filter filter = (Filter) e.nextElement();
       filterHash.put(filter.getToken(), filter.getValue());
     }
   }
   return filterHash;
 }
Beispiel #5
0
 static {
   for (Filter s : EnumSet.allOf(Filter.class)) lookup.put(s.getValue(), s);
 }