Exemple #1
0
 private List<Filter> getSubfilters(List<FilterDto> values) {
   List<Filter> subfilters = new LinkedList<Query.Filter>();
   for (FilterDto cb : values) {
     subfilters.add(cb.getDatastoreFilter());
   }
   return subfilters;
 }
Exemple #2
0
 /** Builds schema of Prospective Search for this filter. */
 protected Map<String, FieldType> buildProsSearchSchema() {
   Map<String, FieldType> schema = new HashMap<String, FieldType>();
   switch (this.operator) {
     case EQ:
     case LT:
     case LE:
     case GT:
     case GE:
     case NE:
       schema.put(getPropName(), detectFieldType(values.get(1)));
       break;
     case IN: // IN supports only String
       schema.put(getPropName(), FieldType.STRING);
     case AND:
     case OR:
       for (FilterDto cb : this.subfilters) {
         schema.putAll(cb.buildProsSearchSchema());
       }
       break;
   }
   return schema;
 }