C - The client objectS - The server objectpublic abstract class AbstractSearchEntity<C extends java.io.Serializable,S extends PersistentObject> extends java.lang.Object implements TransactionContentWithResult<org.bonitasoft.engine.search.SearchResult<C>>
| Constructor and Description |
|---|
AbstractSearchEntity(SearchEntityDescriptor searchDescriptor,
org.bonitasoft.engine.search.SearchOptions options) |
| Modifier and Type | Method and Description |
|---|---|
abstract java.util.List<C> |
convertToClientObjects(java.util.List<S> serverObjects)
Must convert server objects in client objects here
|
void |
execute() |
abstract long |
executeCount(QueryOptions queryOptions)
Execute the count here
|
abstract java.util.List<S> |
executeSearch(QueryOptions queryOptions)
Execute the search here
|
org.bonitasoft.engine.search.SearchResult<C> |
getResult() |
protected org.bonitasoft.engine.search.impl.SearchFilter |
getSearchFilter(org.bonitasoft.engine.search.SearchOptions searchOptions,
java.lang.String searchedKey) |
org.bonitasoft.engine.search.SearchResult<C> |
search()
execute this search and return the result
|
static <C extends java.io.Serializable,S extends PersistentObject> |
search(SearchEntityDescriptor searchDescriptor,
org.bonitasoft.engine.search.SearchOptions options,
BonitaReadFunction<java.util.List<S>,java.util.List<C>> converter,
BonitaReadFunction<QueryOptions,java.lang.Long> count,
BonitaReadFunction<QueryOptions,java.util.List<S>> search) |
protected void |
validateQuery(org.bonitasoft.engine.search.SearchOptions options) |
public AbstractSearchEntity(SearchEntityDescriptor searchDescriptor, org.bonitasoft.engine.search.SearchOptions options)
searchDescriptor - The search descriptor of the searched entityoptions - The options of the searchprotected void validateQuery(org.bonitasoft.engine.search.SearchOptions options)
throws SBonitaException
SBonitaExceptionpublic void execute()
throws SBonitaException
execute in interface TransactionContentSBonitaExceptionpublic org.bonitasoft.engine.search.SearchResult<C> search() throws org.bonitasoft.engine.exception.SearchException
org.bonitasoft.engine.exception.SearchExceptionpublic abstract long executeCount(QueryOptions queryOptions) throws SBonitaReadException
queryOptions - The query options to execute the count withSBonitaReadException - when the search failed to retrieve the count numberpublic abstract java.util.List<S> executeSearch(QueryOptions queryOptions) throws SBonitaReadException
queryOptions - The query options to execute the search withSBonitaReadException - when the search failed to retrieve the resultspublic abstract java.util.List<C> convertToClientObjects(java.util.List<S> serverObjects) throws SBonitaException
serverObjects - The server object to convertSBonitaExceptionpublic org.bonitasoft.engine.search.SearchResult<C> getResult()
getResult in interface TransactionContentWithResult<org.bonitasoft.engine.search.SearchResult<C extends java.io.Serializable>>protected org.bonitasoft.engine.search.impl.SearchFilter getSearchFilter(org.bonitasoft.engine.search.SearchOptions searchOptions,
java.lang.String searchedKey)
public static <C extends java.io.Serializable,S extends PersistentObject> org.bonitasoft.engine.search.SearchResult<C> search(SearchEntityDescriptor searchDescriptor, org.bonitasoft.engine.search.SearchOptions options, BonitaReadFunction<java.util.List<S>,java.util.List<C>> converter, BonitaReadFunction<QueryOptions,java.lang.Long> count, BonitaReadFunction<QueryOptions,java.util.List<S>> search) throws org.bonitasoft.engine.exception.SearchException
org.bonitasoft.engine.exception.SearchException