Package com.appiancorp.common.query
Class GenericQuery.GenericBuilder
java.lang.Object
com.appiancorp.common.query.Query.Builder<Object>
com.appiancorp.common.query.GenericQuery.GenericBuilder
- All Implemented Interfaces:
QueryBuilder<Object>
,QueryBuilder.Aggregating<Object>
,QueryBuilder.Filtering<Object>
,QueryBuilder.FilteringCriteria<Object>
,QueryBuilder.Grouping<Object>
,QueryBuilder.Paging<Object>
,QueryBuilder.Selecting<Object>
,QueryBuilder.Sorting<Object>
,QueryBuilderTools
- Enclosing class:
- GenericQuery
public static final class GenericQuery.GenericBuilder
extends Query.Builder<Object>
implements QueryBuilderTools
A class for incrementally build a
GenericQuery
.
The objective of this builder is to help the developer to construct a Query in a more organic way to ease development and avoid invalid configurations.
Each method returns the same Builder instance, but it is bound by interface which the method returns. This way is simulating a flow and the available valid configurations after the current configuration.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
This class encapsulates all the available Aggregation Functions in a more object oriented way.static final class
This class is available as a preview of functionality that will be added to the supported public API in a future release.static final class
This class is available as a preview of functionality that will be added to the supported public API in a future release.static final class
This class is available as a preview of functionality that will be added to the supported public API in a future release.static final class
This class is available as a preview of functionality that will be added to the supported public API in a future release.static final class
This is how you instantiate columns to configure a query for selection, grouping or aggregation.Nested classes/interfaces inherited from interface com.appiancorp.common.query.QueryBuilder
QueryBuilder.Aggregating<T>, QueryBuilder.Filtering<T>, QueryBuilder.FilteringCriteria<T>, QueryBuilder.Grouping<T>, QueryBuilder.Paging<T>, QueryBuilder.Selecting<T>, QueryBuilder.Sorting<T>
-
Constructor Summary
ModifierConstructorDescriptionprotected
Initializes a newly createdGenericBuilder
protected
GenericBuilder
(Query<Object> query) Constructs aGenericBuilder
using the givenQuery
as a base -
Method Summary
Modifier and TypeMethodDescriptionprotected LogicalExpression<?>
newLogicalOperation
(LogicalOperator lo, List<Criteria> conditions) Returns aGenericLogicalExpression
instance
-
Constructor Details
-
GenericBuilder
protected GenericBuilder()Initializes a newly createdGenericBuilder
-
GenericBuilder
Constructs aGenericBuilder
using the givenQuery
as a base- Parameters:
query
- aQuery
-
-
Method Details
-
newLogicalOperation
Returns aGenericLogicalExpression
instance- Specified by:
newLogicalOperation
in classQuery.Builder<Object>
- Parameters:
lo
- logical operation type represented byLogicalOperator
conditions
-- Returns:
- a
GenericLogicalExpression
instance
-