KIE Internal 6.2.0.CR2

org.kie.internal.query
Interface ParametrizedQueryBuilder<T>

Type Parameters:
T - The type of ParametrizedQueryBuilder instance being implemented. This type is here to facilitate the building of a fluent interface.
All Known Subinterfaces:
AuditQueryBuilder<T>, NodeInstanceLogQueryBuilder, ProcessInstanceLogQueryBuilder, TaskQueryBuilder, VariableInstanceLogQueryBuilder

public interface ParametrizedQueryBuilder<T>

This is the base interface for all ParametrizedQueryBuilder implementations.

It includes the basic query functions.


Method Summary
 T ascending()
          If the ParametrizedQueryBuilder implementations contains an orderBy( enum ) method, this will set the ordering to ascending.
 T clear()
          Clear all parameters and meta-criteria
 T descending()
          If the ParametrizedQueryBuilder implementations contains an orderBy( enum ) method, this will set the ordering to descending.
 T equals()
          Results retrieved using query criteria added after this method is used, must exactly match the criteria given.
 T intersect()
          Query criteria which are added to the query after this method are "AND" or "intersection" criteria.
 T like()
          Query criteria which are added to the query after this method are regular expression (a.k.a "regex") criteria.
 T maxResults(int maxResults)
          Limit the number of results returned by the query to the specified maximum.
 T offset(int offset)
          Limit the results returned by excluding the specified number of results (the offset), from the start of the result list.
 T union()
          Query criteria which are added to the query after this method are "OR" or "union" criteria.
 

Method Detail

union

T union()
Query criteria which are added to the query after this method are "OR" or "union" criteria. In other words, the query will return results which match any of the criteria added (as opposed to having to match all of the criteria added).

This is the default mode for all query builders.

Returns:
the current query builder instance

intersect

T intersect()
Query criteria which are added to the query after this method are "AND" or "intersection" criteria. In other words, the query will only return results which match all of the criteria added (as opposed to returning results that match any of the criteria added).

Returns:
the current query builder instance

like

T like()
Query criteria which are added to the query after this method are regular expression (a.k.a "regex") criteria. In other words, the query will return results which match the regular expressions specified.

Only String criteria may be added after using this method. In order to go back to adding normal or non-regex criteria, use the equals() method.

The following characters may be used:

Returns:
the current query builder instance

equals

T equals()
Results retrieved using query criteria added after this method is used, must exactly match the criteria given.

If the like() method has been used, using this method will ensure that criteria added after this method are literally interpreted, and not seen as regular expressions.

This is the default mode for all query builders.

Returns:
the current query builder instance

clear

T clear()
Clear all parameters and meta-criteria

Returns:
the current query builder instance

ascending

T ascending()
If the ParametrizedQueryBuilder implementations contains an orderBy( enum ) method, this will set the ordering to ascending.

Query results will be ascendingly ordered by default.

If there is no orderBy( enum ) method available, this method will not do anything.

Returns:
the current query builder instance

descending

T descending()
If the ParametrizedQueryBuilder implementations contains an orderBy( enum ) method, this will set the ordering to descending.

If there is no orderBy( enum ) method available, this method will not do anything.

Returns:
the current query builder instance

maxResults

T maxResults(int maxResults)
Limit the number of results returned by the query to the specified maximum.

Returns:
the current query builder instance

offset

T offset(int offset)
Limit the results returned by excluding the specified number of results (the offset), from the start of the result list.

Which results are excluded (offset) is dependent on the order of the results returned. See the orderBy(enum) methods as well as ascending() and descending().

Returns:
the current query builder instance

KIE Internal 6.2.0.CR2

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.