Constructor and Description |
---|
SearchImpl(java.util.List<java.lang.Class<? extends RegistryBean>> beanClasses,
BeanPool beanPool,
QueryContext context)
Creates a Search object.
|
Modifier and Type | Method and Description |
---|---|
Search |
addOrder(Order order)
Add an ordering to the result.
|
Search |
addPredicate(Predicate predicate)
Adds the given predicate to constrain the results to be retrieved.
|
java.util.List<java.lang.Class<? extends RegistryBean>> |
getBeanClasses()
Gets the list of bean classes.
|
ManagedBeanPool |
getBeanPool()
Gets the bean pool.
|
java.util.ArrayList<Order> |
getOrders()
Gets the list of orders defined for the predicate search results.
|
CombinedPredicate |
getPredicate()
Gets the predicate object.
|
java.util.List<RegistryBean> |
result()
Executes the search and obtains the result as list.
|
public SearchImpl(java.util.List<java.lang.Class<? extends RegistryBean>> beanClasses, BeanPool beanPool, QueryContext context) throws CSAppFrameworkException
beanClasses
- The List
of RegistryBean Class
objectsbeanPool
- The BeanPool
objectcontext
- The QueryContext
instanceCSAppFrameworkException
- If an error occurs while trying to create the Search instancepublic CombinedPredicate getPredicate()
CombinedPredicate
objectpublic java.util.ArrayList<Order> getOrders()
ArrayList
of Order
objectspublic java.util.List<java.lang.Class<? extends RegistryBean>> getBeanClasses()
List
of RegistryBean Class
objectspublic Search addOrder(Order order) throws CSAppFrameworkException
Search
addOrder
in interface Search
order
- The result Order
Search
object after adding the result orderCSAppFrameworkException
- If an error occurs while adding the result orderpublic Search addPredicate(Predicate predicate) throws CSAppFrameworkException
Search
addPredicate
in interface Search
predicate
- The Predicate
to be addedSearch
object after adding the predicateCSAppFrameworkException
- If an error occurs while addding the predicatepublic java.util.List<RegistryBean> result() throws CSAppFrameworkException
Search
result
in interface Search
CSAppFrameworkException
- If an error occurs while executing the search and obtaining the resultspublic ManagedBeanPool getBeanPool()
ManagedBeanPool
object