executeNamedQuery (IProcess, String, Integer, Integer)
public QueryResult executeNamedQuery (IProcessparent, String queryName, Integer startRange, Integer span) throws AccessDeniedException, ExecutionException;
This method runs the query with the specified name and returns the instances of the business objects matching the conditions of the query. The query with this name must be configured in the business space version. The method may return only a subset of found instances as defined by the startRange and span parameters.
Parameters
queryName | the name of the query to run |
startRange | the number identifying the start of the range of the business object instances returned by the query (starting with 1). If all instances are to be returned this parameter must be null. |
span | the number of instances of the business objects to return. If all instances are to be returned this parameter must be null. |
Returns
The instances of the business objects that match the query conditions. These instances are wrapped in the QueryResult object, which also has the total number of instances in the system matching the query conditions. Note that this number can be greater than the number of business object instances returned by the method as the method may return only a subset of instances matching the conditions (if startRange and span are specified).