Class Query
- java.lang.Object
-
- org.opencds.cqf.cql.engine.elm.execution.Executable
-
- org.cqframework.cql.elm.execution.Element
-
- org.cqframework.cql.elm.execution.Expression
-
- org.cqframework.cql.elm.execution.Query
-
- All Implemented Interfaces:
org.jvnet.jaxb2_commons.lang.Equals2,org.jvnet.jaxb2_commons.lang.HashCode2,org.jvnet.jaxb2_commons.lang.ToString2
- Direct Known Subclasses:
QueryEvaluator
public class Query extends Expression implements org.jvnet.jaxb2_commons.lang.Equals2, org.jvnet.jaxb2_commons.lang.HashCode2, org.jvnet.jaxb2_commons.lang.ToString2
The Query operator represents a clause-based query. The result of the query is determined by the type of sources included, as well as the clauses used in the query.Java class for Query complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="Query"> <complexContent> <extension base="{urn:hl7-org:elm:r1}Expression"> <sequence> <element name="source" type="{urn:hl7-org:elm:r1}AliasedQuerySource" maxOccurs="unbounded"/> <element name="let" type="{urn:hl7-org:elm:r1}LetClause" maxOccurs="unbounded" minOccurs="0"/> <element name="relationship" type="{urn:hl7-org:elm:r1}RelationshipClause" maxOccurs="unbounded" minOccurs="0"/> <element name="where" type="{urn:hl7-org:elm:r1}Expression" minOccurs="0"/> <element name="return" type="{urn:hl7-org:elm:r1}ReturnClause" minOccurs="0"/> <element name="aggregate" type="{urn:hl7-org:elm:r1}AggregateClause" minOccurs="0"/> <element name="sort" type="{urn:hl7-org:elm:r1}SortClause" minOccurs="0"/> </sequence> </extension> </complexContent> </complexType>
-
-
Field Summary
Fields Modifier and Type Field Description protected ReturnClause_returnprotected AggregateClauseaggregateprotected java.util.List<LetClause>letprotected java.util.List<RelationshipClause>relationshipprotected SortClausesortprotected java.util.List<AliasedQuerySource>sourceprotected Expressionwhere-
Fields inherited from class org.cqframework.cql.elm.execution.Element
annotation, localId, locator, resultTypeName, resultTypeSpecifier
-
-
Constructor Summary
Constructors Constructor Description Query()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuilderappend(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, java.lang.StringBuilder buffer, org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)java.lang.StringBuilderappendFields(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, java.lang.StringBuilder buffer, org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)booleanequals(java.lang.Object object)booleanequals(org.jvnet.jaxb2_commons.locator.ObjectLocator thisLocator, org.jvnet.jaxb2_commons.locator.ObjectLocator thatLocator, java.lang.Object object, org.jvnet.jaxb2_commons.lang.EqualsStrategy2 strategy)AggregateClausegetAggregate()Gets the value of the aggregate property.java.util.List<LetClause>getLet()Gets the value of the let property.java.util.List<RelationshipClause>getRelationship()Gets the value of the relationship property.ReturnClausegetReturn()Gets the value of the return property.SortClausegetSort()Gets the value of the sort property.java.util.List<AliasedQuerySource>getSource()Gets the value of the source property.ExpressiongetWhere()Gets the value of the where property.inthashCode()inthashCode(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, org.jvnet.jaxb2_commons.lang.HashCodeStrategy2 strategy)voidsetAggregate(AggregateClause value)Sets the value of the aggregate property.voidsetReturn(ReturnClause value)Sets the value of the return property.voidsetSort(SortClause value)Sets the value of the sort property.voidsetWhere(Expression value)Sets the value of the where property.java.lang.StringtoString()QuerywithAggregate(AggregateClause value)QuerywithAnnotation(java.util.Collection<CqlToElmBase> values)QuerywithAnnotation(CqlToElmBase... values)QuerywithLet(java.util.Collection<LetClause> values)QuerywithLet(LetClause... values)QuerywithLocalId(java.lang.String value)QuerywithLocator(java.lang.String value)QuerywithRelationship(java.util.Collection<RelationshipClause> values)QuerywithRelationship(RelationshipClause... values)QuerywithResultTypeName(javax.xml.namespace.QName value)QuerywithResultTypeSpecifier(TypeSpecifier value)QuerywithReturn(ReturnClause value)QuerywithSort(SortClause value)QuerywithSource(java.util.Collection<AliasedQuerySource> values)QuerywithSource(AliasedQuerySource... values)QuerywithWhere(Expression value)-
Methods inherited from class org.cqframework.cql.elm.execution.Element
getAnnotation, getLocalId, getLocator, getResultTypeName, getResultTypeSpecifier, setLocalId, setLocator, setResultTypeName, setResultTypeSpecifier
-
Methods inherited from class org.opencds.cqf.cql.engine.elm.execution.Executable
evaluate, internalEvaluate
-
-
-
-
Field Detail
-
source
protected java.util.List<AliasedQuerySource> source
-
let
protected java.util.List<LetClause> let
-
relationship
protected java.util.List<RelationshipClause> relationship
-
where
protected Expression where
-
_return
protected ReturnClause _return
-
aggregate
protected AggregateClause aggregate
-
sort
protected SortClause sort
-
-
Method Detail
-
getSource
public java.util.List<AliasedQuerySource> getSource()
Gets the value of the source property.This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
setmethod for the source property.For example, to add a new item, do as follows:
getSource().add(newItem);Objects of the following type(s) are allowed in the list
AliasedQuerySource
-
getLet
public java.util.List<LetClause> getLet()
Gets the value of the let property.This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
setmethod for the let property.For example, to add a new item, do as follows:
getLet().add(newItem);Objects of the following type(s) are allowed in the list
LetClause
-
getRelationship
public java.util.List<RelationshipClause> getRelationship()
Gets the value of the relationship property.This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
setmethod for the relationship property.For example, to add a new item, do as follows:
getRelationship().add(newItem);Objects of the following type(s) are allowed in the list
RelationshipClause
-
getWhere
public Expression getWhere()
Gets the value of the where property.- Returns:
- possible object is
Expression
-
setWhere
public void setWhere(Expression value)
Sets the value of the where property.- Parameters:
value- allowed object isExpression
-
getReturn
public ReturnClause getReturn()
Gets the value of the return property.- Returns:
- possible object is
ReturnClause
-
setReturn
public void setReturn(ReturnClause value)
Sets the value of the return property.- Parameters:
value- allowed object isReturnClause
-
getAggregate
public AggregateClause getAggregate()
Gets the value of the aggregate property.- Returns:
- possible object is
AggregateClause
-
setAggregate
public void setAggregate(AggregateClause value)
Sets the value of the aggregate property.- Parameters:
value- allowed object isAggregateClause
-
getSort
public SortClause getSort()
Gets the value of the sort property.- Returns:
- possible object is
SortClause
-
setSort
public void setSort(SortClause value)
Sets the value of the sort property.- Parameters:
value- allowed object isSortClause
-
withSource
public Query withSource(AliasedQuerySource... values)
-
withSource
public Query withSource(java.util.Collection<AliasedQuerySource> values)
-
withRelationship
public Query withRelationship(RelationshipClause... values)
-
withRelationship
public Query withRelationship(java.util.Collection<RelationshipClause> values)
-
withWhere
public Query withWhere(Expression value)
-
withReturn
public Query withReturn(ReturnClause value)
-
withAggregate
public Query withAggregate(AggregateClause value)
-
withSort
public Query withSort(SortClause value)
-
withAnnotation
public Query withAnnotation(CqlToElmBase... values)
- Overrides:
withAnnotationin classExpression
-
withAnnotation
public Query withAnnotation(java.util.Collection<CqlToElmBase> values)
- Overrides:
withAnnotationin classExpression
-
withResultTypeSpecifier
public Query withResultTypeSpecifier(TypeSpecifier value)
- Overrides:
withResultTypeSpecifierin classExpression
-
withLocalId
public Query withLocalId(java.lang.String value)
- Overrides:
withLocalIdin classExpression
-
withLocator
public Query withLocator(java.lang.String value)
- Overrides:
withLocatorin classExpression
-
withResultTypeName
public Query withResultTypeName(javax.xml.namespace.QName value)
- Overrides:
withResultTypeNamein classExpression
-
equals
public boolean equals(org.jvnet.jaxb2_commons.locator.ObjectLocator thisLocator, org.jvnet.jaxb2_commons.locator.ObjectLocator thatLocator, java.lang.Object object, org.jvnet.jaxb2_commons.lang.EqualsStrategy2 strategy)- Specified by:
equalsin interfaceorg.jvnet.jaxb2_commons.lang.Equals2- Overrides:
equalsin classExpression
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classExpression
-
hashCode
public int hashCode(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, org.jvnet.jaxb2_commons.lang.HashCodeStrategy2 strategy)- Specified by:
hashCodein interfaceorg.jvnet.jaxb2_commons.lang.HashCode2- Overrides:
hashCodein classExpression
-
hashCode
public int hashCode()
- Overrides:
hashCodein classExpression
-
toString
public java.lang.String toString()
- Overrides:
toStringin classExpression
-
append
public java.lang.StringBuilder append(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, java.lang.StringBuilder buffer, org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)- Specified by:
appendin interfaceorg.jvnet.jaxb2_commons.lang.ToString2- Overrides:
appendin classExpression
-
appendFields
public java.lang.StringBuilder appendFields(org.jvnet.jaxb2_commons.locator.ObjectLocator locator, java.lang.StringBuilder buffer, org.jvnet.jaxb2_commons.lang.ToStringStrategy2 strategy)- Specified by:
appendFieldsin interfaceorg.jvnet.jaxb2_commons.lang.ToString2- Overrides:
appendFieldsin classExpression
-
-