Class ScoredHandler
java.lang.Object
ch.tocco.nice2.netui.impl.bind.entity.search.ScoredHandler
- All Implemented Interfaces:
SearchRequestHandler
-
Field Summary
-
Constructor Summary
ConstructorDescriptionScoredHandler
(QueryParameterHandler qdelegeate, int score) ScoredHandler
(SearchRequestHandler delegate, int score) -
Method Summary
Modifier and TypeMethodDescriptioncreateSearchQuery
(SearchRequest request) Returns the search query for this search request.int
getScore
(SearchRequest request) Returns the priority of this handler.score()
static List
<SearchRequestHandler> sortByScore
(List<SearchRequestHandler> requestHandlers, SearchRequest request)
-
Field Details
-
COMPARATOR
-
-
Constructor Details
-
ScoredHandler
-
ScoredHandler
-
-
Method Details
-
score
-
getScore
Description copied from interface:SearchRequestHandler
Returns the priority of this handler. The most positive score is considered as highest priority. The higher the score, the more specialized this handler is in handling the request. This is called on every search!- Specified by:
getScore
in interfaceSearchRequestHandler
-
createSearchQuery
Description copied from interface:SearchRequestHandler
Returns the search query for this search request.- Specified by:
createSearchQuery
in interfaceSearchRequestHandler
- Throws:
RpcExecutionException
-
sortByScore
public static List<SearchRequestHandler> sortByScore(List<SearchRequestHandler> requestHandlers, SearchRequest request)
-