Package org.hisp.dhis.query
Class Query
java.lang.Object
org.hisp.dhis.query.Query
Metadata query.
- Author:
- Lars Helge Overland
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a filter to this query.Enables ordering for this query.Returns filters.getOrder()Returns the order of this query.Returns the paging for this query.Returns the root junction of this query.static Queryinstance()Produces a query instance.booleanIndicates whether expansion of associations is enabled.Sets ordering for this query.Enables paging for this query.Enables expansion of associations, i.e.withRootJunction(RootJunction rootJunction) Determines the logic to use when combining filters.
-
Constructor Details
-
Query
public Query()
-
-
Method Details
-
instance
Produces a query instance.- Returns:
- a
Queryinstance.
-
addFilter
Adds a filter to this query. -
addOrder
Enables ordering for this query. -
setOrder
Sets ordering for this query. -
getOrder
Returns the order of this query.- Returns:
- the
Order.
-
getFilters
Returns filters.- Returns:
- a list of
Filter.
-
setPaging
Enables paging for this query.- Parameters:
page- the page to return.pageSize- the page size to return.- Returns:
- this
Query.
-
getPaging
Returns the paging for this query.- Returns:
- the
Paging.
-
getRootJunction
Returns the root junction of this query.- Returns:
- the
RootJunction
-
withExpandAssociations
Enables expansion of associations, i.e. that all properties of associated objects will be present. Applies to lists of objects only (not single objects).- Returns:
- this
Query.
-
withRootJunction
Determines the logic to use when combining filters.- Parameters:
rootJunction- theRootJunction.- Returns:
- this
Query
-
isExpandAssociations
public boolean isExpandAssociations()Indicates whether expansion of associations is enabled. Applies to lists of objects only (not single objects).- Returns:
- true if expansion of associations is enabled, false if not.
-