public class SearchClientImpl<ItemType> extends Object implements SearchClient<ItemType>
SearchClient
.Constructor and Description |
---|
SearchClientImpl(SearchExecutionService<ItemType> searchService) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(Expression filter)
This convenience method checks whether an element matching the filter actually exists.
|
Iterable<ItemType> |
list()
This method returns an iterable over the complete result of the search using the default paging.
|
Iterable<ItemType> |
list(Expression filter)
This method returns an iterable over the filtered result of the search using the default paging.
|
Iterable<ItemType> |
list(Expression filter,
List<FieldOrderDescriptor> order,
PageDefinition paging)
This method returns an iterable over the filtered result of the search paging as defined.
|
Iterable<ItemType> |
list(Expression filter,
PageDefinition paging)
This method returns an iterable over the filtered result of the search paging as defined.
|
Iterable<ItemType> |
list(List<String> fields,
Expression filter,
List<FieldOrderDescriptor> order,
PageDefinition paging)
This method returns an iterable over the filtered result of the search paging as defined.
|
Iterable<ItemType> |
list(List<String> fields,
Expression filter,
PageDefinition paging)
This method returns an iterable over the filtered result of the search paging as defined.
|
Iterable<ItemType> |
list(Statement statement,
PageDefinition paging)
This method returns an iterable over the filtered result of the search paging as defined.
|
SearchResultPage<ItemType> |
page(int offset,
int pageSize)
This method retrieves the given page of the result of the search.
|
SearchResultPage<ItemType> |
page(PageDefinition paging)
This method retrieves the given page of the result of the search.
|
SearchResultPage<ItemType> |
search(Statement statement,
PageDefinition pageDefinition)
Returns the result page for a query execution with custom paging/fetch window size.
|
ItemType |
uniqueResult(Expression filter)
This convenience method expects the filter to return at most one result.
|
public SearchClientImpl(SearchExecutionService<ItemType> searchService)
public SearchResultPage<ItemType> search(Statement statement, PageDefinition pageDefinition) throws EcmException
SearchExecutionService
search
in interface SearchExecutionService<ItemType>
statement
- search expressionpageDefinition
- result page offset and sizeSearchException
- indicates any error during the search operationEcmException
public Iterable<ItemType> list(Statement statement, PageDefinition paging) throws EcmException
SearchClient
list
in interface SearchClient<ItemType>
statement
- a statement filtering the resultpaging
- the paging the returned iterator should useEcmException
public Iterable<ItemType> list(List<String> fields, Expression filter, List<FieldOrderDescriptor> order, PageDefinition paging) throws EcmException
SearchClient
list
in interface SearchClient<ItemType>
fields
- the fields of the result to deliverfilter
- a filter for the resultorder
- the order of the result listpaging
- the paging the returned iterator should useEcmException
public Iterable<ItemType> list(List<String> fields, Expression filter, PageDefinition paging) throws EcmException
SearchClient
list
in interface SearchClient<ItemType>
fields
- the fields of the result to deliverfilter
- a filter for the resultpaging
- the paging the returned iterator should useEcmException
public Iterable<ItemType> list(Expression filter, List<FieldOrderDescriptor> order, PageDefinition paging) throws EcmException
SearchClient
list
in interface SearchClient<ItemType>
filter
- a filter for the resultorder
- the order of the result listpaging
- the paging the returned iterator should useEcmException
public Iterable<ItemType> list(Expression filter, PageDefinition paging) throws EcmException
SearchClient
list
in interface SearchClient<ItemType>
filter
- a filter for the resultpaging
- the paging the returned iterator should useEcmException
public Iterable<ItemType> list(Expression filter) throws EcmException
SearchClient
list
in interface SearchClient<ItemType>
filter
- a filter for the resultEcmException
public Iterable<ItemType> list() throws EcmException
SearchClient
list
in interface SearchClient<ItemType>
EcmException
public ItemType uniqueResult(Expression filter) throws EcmException
SearchClient
null
is returned. If one such element exists it is returned. Otherwise an IllegalRequestException
is thrown.uniqueResult
in interface SearchClient<ItemType>
filter
- a filter yielding true for at most one elementEcmException
public boolean exists(Expression filter) throws EcmException
SearchClient
exists
in interface SearchClient<ItemType>
filter
- the filter to checkEcmException
public SearchResultPage<ItemType> page(PageDefinition paging) throws EcmException
SearchClient
page
in interface SearchClient<ItemType>
paging
- the page to retrieveEcmException
public SearchResultPage<ItemType> page(int offset, int pageSize) throws EcmException
SearchClient
page
in interface SearchClient<ItemType>
offset
- the offset of the pagepageSize
- the size of the pageEcmException
Copyright © 2016 Lexmark Enterprise Software Deutschland GmbH. All rights reserved.