public SearchResult(String id, String prefix, String reference, String title, String url, Date timestamp, Map<String, Object> fields) { super(id, prefix, reference, title, url); // set up the dates correctly if (timestamp == null) { timestamp = DEFAULT_DATE; } if (fields != null) { for (Entry<String, Object> entry : fields.entrySet()) { if (entry.getValue() != null) { setProperty(entry.getKey(), entry.getValue().toString()); } } } }
/** * Add results to the total results, * this will not allow adding results beyond the totalItemsMatched (max) number * * @param steepleItem the result to add * @return true if the item was added OR false if it was null or the max number is already added */ public boolean addResult(SearchContent content) { boolean added = false; if (content != null) { SearchResult sr = new SearchResult(content); added = addResult(sr); } return added; }