C - The client objectS - The server objectpublic abstract class AbstractSearchEntity<C extends Serializable,S extends PersistentObject> extends Object implements org.bonitasoft.engine.commons.transaction.TransactionContentWithResult<SearchResult<C>>
| Constructor and Description |
|---|
AbstractSearchEntity(SearchEntityDescriptor searchDescriptor,
SearchOptions options) |
| Modifier and Type | Method and Description |
|---|---|
abstract List<C> |
convertToClientObjects(List<S> serverObjects)
Must convert server objects in client objects here
|
void |
execute() |
abstract long |
executeCount(QueryOptions queryOptions)
Execute the count here
|
abstract List<S> |
executeSearch(QueryOptions queryOptions)
Execute the search here
|
SearchResult<C> |
getResult() |
protected SearchFilter |
getSearchFilter(SearchOptions searchOptions,
String searchedKey) |
SearchResult<C> |
search()
execute this search and return the result
|
static <C extends Serializable,S extends PersistentObject> |
search(SearchEntityDescriptor searchDescriptor,
SearchOptions options,
BonitaReadFunction<List<S>,List<C>> converter,
BonitaReadFunction<QueryOptions,Long> count,
BonitaReadFunction<QueryOptions,List<S>> search) |
protected void |
validateQuery(SearchOptions options) |
public AbstractSearchEntity(SearchEntityDescriptor searchDescriptor, SearchOptions options)
searchDescriptor - The search descriptor of the searched entityoptions - The options of the searchprotected void validateQuery(SearchOptions options) throws org.bonitasoft.engine.commons.exceptions.SBonitaException
org.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic void execute()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
execute in interface org.bonitasoft.engine.commons.transaction.TransactionContentorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic SearchResult<C> search() throws SearchException
SearchExceptionpublic abstract long executeCount(QueryOptions queryOptions) throws SBonitaReadException
queryOptions - The query options to execute the count withSBonitaReadExceptionpublic abstract List<S> executeSearch(QueryOptions queryOptions) throws SBonitaReadException
queryOptions - The query options to execute the search withSBonitaReadExceptionpublic abstract List<C> convertToClientObjects(List<S> serverObjects) throws org.bonitasoft.engine.commons.exceptions.SBonitaException
serverObjects - The server object to convertorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic SearchResult<C> getResult()
getResult in interface org.bonitasoft.engine.commons.transaction.TransactionContentWithResult<SearchResult<C extends Serializable>>protected SearchFilter getSearchFilter(SearchOptions searchOptions, String searchedKey)
public static <C extends Serializable,S extends PersistentObject> SearchResult<C> search(SearchEntityDescriptor searchDescriptor, SearchOptions options, BonitaReadFunction<List<S>,List<C>> converter, BonitaReadFunction<QueryOptions,Long> count, BonitaReadFunction<QueryOptions,List<S>> search) throws SearchException
SearchExceptionCopyright © 2019 Bonitasoft S.A.. All rights reserved.