/** * Copy the contents of the source search object into a new search object. * All collections are copied into new collections, but the items in those * collections are not duplicated; they still point to the same objects. */ public static IMutableSearch copy(ISearch source) { return copy(source, new Search()); }
public static void clear(IMutableSearch search) { clearFilters(search); clearSorts(search); clearFields(search); clearPaging(search); clearFetches(search); search.setResultMode(RESULT_AUTO); search.setDisjunction(false); }
/** * Add a filter that uses the > operator. */ public static void addFilterGreaterThan(IMutableSearch search, String property, Object value) { addFilter(search, Filter.greaterThan(property, value)); }
/** * Add a filter that uses the <= operator. */ public static void addFilterLessOrEqual(IMutableSearch search, String property, Object value) { addFilter(search, Filter.lessOrEqual(property, value)); }
/** * If this field is used with <code>resultMode == RESULT_MAP</code>, the * <code>property</code> will also be used as the key for this value in the * map. */ public static void addField(IMutableSearch search, String property) { if (property == null) return; // null properties do nothing, don't bother to add them. addField(search, new Field(property)); }