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
Nested ClassesModifier and TypeClassDescriptionstatic classA class for incrementally build a Query. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQuery()protectedQuery(Projection<? extends Column> projection, Criteria criteria, PagingInfo pagingInfo) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleangetColumnIgnoreCase(String alias) Returns theColumnassociated with the given alias ignoring case sensitivity.abstract CriteriaGets theCriteriaGets thePagingInfoGets theProjectionfinal inthashCode()booleanChecks if the search criteria is being usedbooleanhasSort()Checks if sorting information has been providedbooleanChecks if at least once column is being grouped bybooleanstatic com.appian.core.base.ToStringFunction<Query<?>>multilineToString(int indent) Returns a multiline string representation of theQueryby indenting each element with given number of characters.protected abstract voidsetCriteria(Criteria criteria) Sets theCriteriatoString()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 theColumnassociated with the given alias ignoring case sensitivity.- Parameters:
alias-- Returns:
- the
Columnassociated 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 theQueryby indenting each element with given number of characters.- Parameters:
indent- number of characters to indent- Returns:
- a
ToStringFunctionforQuery
-
hashCode
public final int hashCode() -
equals
-