Package gov.usgs.earthquake.indexer
Class SearchQuery
java.lang.Object
gov.usgs.earthquake.indexer.SearchQuery
- All Implemented Interfaces:
Comparable<SearchQuery>
- Direct Known Subclasses:
EventDetailQuery
,EventsSummaryQuery
,ProductDetailQuery
,ProductsSummaryQuery
A search to execute against a ProductIndex, or ProductStorage.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SearchQuery
(SearchMethod type, ProductIndexQuery query) Construct a new SearchQuery object. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(SearchQuery that) boolean
getError()
abstract Object
Get the result associated with a specific query type.static SearchQuery
getSearchQuery
(SearchMethod type, ProductIndexQuery query) Create a SearchQuery object based on a SearchType.getType()
void
-
Constructor Details
-
SearchQuery
Construct a new SearchQuery object.- Parameters:
type
- the type of search.query
- the query parameters.
-
-
Method Details
-
getType
- Returns:
- type
-
getProductIndexQuery
- Returns:
- ProductIndexQuery
-
getResult
Get the result associated with a specific query type.- Returns:
- the result, or null if the search has not yet executed.
-
getSearchQuery
Create a SearchQuery object based on a SearchType.- Parameters:
type
- the search type to createquery
- the associated query- Returns:
- a SearchQuery, or null if type is unknown.
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<SearchQuery>
-
setError
- Parameters:
error
- the error to set
-
getError
- Returns:
- the error or null if no error occurred.
-