Package com.appiancorp.common.query
Class Query<T>
java.lang.Object
com.appiancorp.common.query.Query<T>
- Type Parameters:
T
- Type of value
- Direct Known Subclasses:
GenericQuery
,TypedValueQuery
An object-oriented representation of a query. This supports operations for projection, grouping,
aggregation and filtering/searching prior to aggregating data.
If no selection is specified, all columns will be returned.
A Query instance is obtained by using QueryBuilder
. Query instances are immutable.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A class for incrementally build a Query. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Query()
protected
Query
(Projection<? extends Column> projection, Criteria criteria, PagingInfo pagingInfo) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
getColumnIgnoreCase
(String alias) Returns theColumn
associated with the given alias ignoring case sensitivity.abstract Criteria
Gets theCriteria
Gets thePagingInfo
Gets theProjection
final int
hashCode()
boolean
Checks if the search criteria is being usedboolean
hasSort()
Checks if sorting information has been providedboolean
Checks if at least once column is being grouped byboolean
static com.appian.core.base.ToStringFunction<Query<?>>
multilineToString
(int indent) Returns a multiline string representation of theQuery
by indenting each element with given number of characters.protected abstract void
setCriteria
(Criteria criteria) Sets theCriteria
toString()
Returns a multiline string representation of theQuery
-
Field Details
-
XML_ROOT_ELEMENT
- See Also:
-
LOCAL_PART
- See Also:
-
QNAME
-
-
Constructor Details
-
Query
protected Query() -
Query
-
-
Method Details
-
getProjection
Gets theProjection
- Returns:
- the
Projection
-
getPagingInfo
Gets thePagingInfo
- Returns:
- the
PagingInfo
-
getCriteria
Gets theCriteria
- Returns:
- the
Criteria
-
setCriteria
Sets theCriteria
- Parameters:
criteria
- theCriteria
-
hasSort
public boolean hasSort()Checks if sorting information has been provided- Returns:
- true if the Query has sorting information; false otherwise
-
isGrouping
public boolean isGrouping()Checks if at least once column is being grouped by- Returns:
- true if there is at least one column which is grouped by; false otherwise
-
hasSearch
public boolean hasSearch()Checks if the search criteria is being used- Returns:
- true if the search criteria is being used; false otherwise
-
getColumnIgnoreCase
Returns theColumn
associated with the given alias ignoring case sensitivity.- Parameters:
alias
-- Returns:
- the
Column
associated with the given alias
-
isProjection
public boolean isProjection() -
toString
-
toStringMultiline
Returns a multiline string representation of theQuery
- Returns:
- a multiline string representation of the
Query
-
multilineToString
Returns a multiline string representation of theQuery
by indenting each element with given number of characters.- Parameters:
indent
- number of characters to indent- Returns:
- a
ToStringFunction
forQuery
-
hashCode
public final int hashCode() -
equals
-