Interface QueryBuilder
public interface QueryBuilder
Builder interface to create basic query objects.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionSets one of the selected fields from the queried entity.addOrderByField(Field field) Sets one of the fields to order by from.build()Returns the final buildedDsqlQuery.setDirection(Direction direction) Sets the sorting direction of the query.setFilterExpression(Expression expression) Sets an expression to filter the returned query elements.setLimit(int limit) Sets the maximum results that can be retrieved by the builded query.setOffset(int offset) Sets the number of items to skip from the beginning of the result set.setType(EntityType type) Sets the queried entity exposed by the application.
-
Method Details
-
setType
Sets the queried entity exposed by the application.- Parameters:
type- the queried entity type.- Returns:
thisQueryBuilderinstance.
-
addField
Sets one of the selected fields from the queried entity.- Parameters:
field- a selected field from the queried entity- Returns:
thisQueryBuilderinstance.
-
addOrderByField
Sets one of the fields to order by from.- Parameters:
field- a field used to sort the query.- Returns:
thisQueryBuilderinstance.
-
setDirection
Sets the sorting direction of the query.- Parameters:
direction- the sorting direction, ASCENDING or DESCENDING.- Returns:
thisQueryBuilderinstance.
-
setFilterExpression
Sets an expression to filter the returned query elements.- Parameters:
expression- a filter expression.- Returns:
thisQueryBuilderinstance.
-
setLimit
Sets the maximum results that can be retrieved by the builded query.- Parameters:
limit- the number of max results that can be retrieved by the query.- Returns:
thisQueryBuilderinstance.
-
setOffset
Sets the number of items to skip from the beginning of the result set.- Parameters:
offset- the number of items to skip from the beginning of the result.- Returns:
thisQueryBuilderinstance.
-
build
DsqlQuery build()Returns the final buildedDsqlQuery.- Returns:
- a
DsqlQueryinstance.
-