Package org.cruk.clarity.api.search
Class SearchTerms<E extends Locatable>
java.lang.Object
org.cruk.clarity.api.search.SearchTerms<E>
- Type Parameters:
E
- The type of object the search terms are for.
- All Implemented Interfaces:
Serializable
Class recording the parameters and entity class of a call to the API's
find
method.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSearchTerms
(Map<String, ?> searchTerms, Class<E> entityClass) Creates a new SearchTerms object with the given values (as have been passed to find). -
Method Summary
-
Constructor Details
-
SearchTerms
Creates a new SearchTerms object with the given values (as have been passed to find).- Parameters:
searchTerms
- The search parameters.entityClass
- The type of object being searched for.
-
-
Method Details
-
getSearchTerms
Get the parameters of the search.- Returns:
- A list of individual search terms.
-
getEntityClass
Get the class being searched for.- Returns:
- The entity class.
-
hashCode
public int hashCode()Override of hash code. The hash should be based on the class being searched for along with the names of the parameters and their individual types and values. The order of values in parameter values is not important. -
equals
Test whether the given object is equal to these SearchTerms. It will be if it is also a SearchTerms object that records a search for the same type of object as this; if it has the same number of parameters with the same names; and if all the values of the parameters are the same (order unimportant for parameters that are collections). -
toString
Get a human readable representation of this object. Gives the type of objects being searched for and the parameters used in the search.
-