org.cqframework.cql.elm.execution.Query Maven / Gradle / Ivy
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0
// See https://javaee.github.io/jaxb-v2/
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2022.01.10 at 12:41:52 PM MST
//
package org.cqframework.cql.elm.execution;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* 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="sort" type="{urn:hl7-org:elm:r1}SortClause" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Query", namespace = "urn:hl7-org:elm:r1", propOrder = {
"source",
"let",
"relationship",
"where",
"_return",
"sort"
})
@SuppressWarnings({
"all"
})
public class Query
extends Expression
implements Equals2, HashCode2, ToString2
{
@XmlElement(namespace = "urn:hl7-org:elm:r1", required = true)
protected List source;
@XmlElement(namespace = "urn:hl7-org:elm:r1")
protected List let;
@XmlElement(namespace = "urn:hl7-org:elm:r1")
protected List relationship;
@XmlElement(namespace = "urn:hl7-org:elm:r1")
protected Expression where;
@XmlElement(name = "return", namespace = "urn:hl7-org:elm:r1")
protected ReturnClause _return;
@XmlElement(namespace = "urn:hl7-org:elm:r1")
protected SortClause sort;
/**
* 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 set
method 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
* {@link AliasedQuerySource }
*
*
*/
public List getSource() {
if (source == null) {
source = new ArrayList();
}
return this.source;
}
/**
* 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 set
method 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
* {@link LetClause }
*
*
*/
public List getLet() {
if (let == null) {
let = new ArrayList();
}
return this.let;
}
/**
* 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 set
method 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
* {@link RelationshipClause }
*
*
*/
public List getRelationship() {
if (relationship == null) {
relationship = new ArrayList();
}
return this.relationship;
}
/**
* Gets the value of the where property.
*
* @return
* possible object is
* {@link Expression }
*
*/
public Expression getWhere() {
return where;
}
/**
* Sets the value of the where property.
*
* @param value
* allowed object is
* {@link Expression }
*
*/
public void setWhere(Expression value) {
this.where = value;
}
/**
* Gets the value of the return property.
*
* @return
* possible object is
* {@link ReturnClause }
*
*/
public ReturnClause getReturn() {
return _return;
}
/**
* Sets the value of the return property.
*
* @param value
* allowed object is
* {@link ReturnClause }
*
*/
public void setReturn(ReturnClause value) {
this._return = value;
}
/**
* Gets the value of the sort property.
*
* @return
* possible object is
* {@link SortClause }
*
*/
public SortClause getSort() {
return sort;
}
/**
* Sets the value of the sort property.
*
* @param value
* allowed object is
* {@link SortClause }
*
*/
public void setSort(SortClause value) {
this.sort = value;
}
public Query withSource(AliasedQuerySource... values) {
if (values!= null) {
for (AliasedQuerySource value: values) {
getSource().add(value);
}
}
return this;
}
public Query withSource(Collection values) {
if (values!= null) {
getSource().addAll(values);
}
return this;
}
public Query withLet(LetClause... values) {
if (values!= null) {
for (LetClause value: values) {
getLet().add(value);
}
}
return this;
}
public Query withLet(Collection values) {
if (values!= null) {
getLet().addAll(values);
}
return this;
}
public Query withRelationship(RelationshipClause... values) {
if (values!= null) {
for (RelationshipClause value: values) {
getRelationship().add(value);
}
}
return this;
}
public Query withRelationship(Collection values) {
if (values!= null) {
getRelationship().addAll(values);
}
return this;
}
public Query withWhere(Expression value) {
setWhere(value);
return this;
}
public Query withReturn(ReturnClause value) {
setReturn(value);
return this;
}
public Query withSort(SortClause value) {
setSort(value);
return this;
}
@Override
public Query withAnnotation(Object... values) {
if (values!= null) {
for (Object value: values) {
getAnnotation().add(value);
}
}
return this;
}
@Override
public Query withAnnotation(Collection