Class AbstractGetEntity<C extends java.io.Serializable,S extends PersistentObject>
- java.lang.Object
-
- org.bonitasoft.engine.api.impl.transaction.AbstractGetEntity<C,S>
-
- Type Parameters:
C- The client objectS- The server object
- All Implemented Interfaces:
TransactionContent,TransactionContentWithResult<java.util.List<C>>
- Direct Known Subclasses:
AbstractGetProcessDeploymentInfo
public abstract class AbstractGetEntity<C extends java.io.Serializable,S extends PersistentObject> extends java.lang.Object implements TransactionContentWithResult<java.util.List<C>>
Abstract class to allow to search server object and convert them to client object- Author:
- Celine Souchet
-
-
Constructor Summary
Constructors Constructor Description AbstractGetEntity(SearchEntityDescriptor searchDescriptor, int fromIndex, int numberOfResults, org.bonitasoft.engine.search.Sort sort)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.List<C>convertToClientObjects(java.util.List<S> serverObjects)Must convert server objects in client objects herevoidexecute()abstract java.util.List<S>executeGet(QueryOptions queryOptions)Execute the search herejava.util.List<C>getResult()
-
-
-
Constructor Detail
-
AbstractGetEntity
public AbstractGetEntity(SearchEntityDescriptor searchDescriptor, int fromIndex, int numberOfResults, org.bonitasoft.engine.search.Sort sort)
- Parameters:
searchDescriptor- The descriptor corresponding to the searched objectfromIndex- The specified position to begin the searchnumberOfResults- The number of elements to returnsort- How to sort the result
-
-
Method Detail
-
execute
public void execute() throws SBonitaException- Specified by:
executein interfaceTransactionContent- Throws:
SBonitaException
-
executeGet
public abstract java.util.List<S> executeGet(QueryOptions queryOptions) throws SBonitaException
Execute the search here- Parameters:
queryOptions- The query options to execute the search with- Returns:
- The searched result
- Throws:
SBonitaException
-
convertToClientObjects
public abstract java.util.List<C> convertToClientObjects(java.util.List<S> serverObjects)
Must convert server objects in client objects here- Parameters:
serverObjects- The server object to convert- Returns:
- The list of the client objects
-
getResult
public java.util.List<C> getResult()
- Specified by:
getResultin interfaceTransactionContentWithResult<C extends java.io.Serializable>
-
-