All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hl7.fhir.Order Maven / Gradle / Ivy

Go to download

The quick library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.22.0
Show newest version
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2018.01.12 at 11:04:27 AM MST 
//


package org.hl7.fhir;

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 org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
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.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;


/**
 * If the element is present, it must have either a @value, an @id, or extensions
 * 
 * 

Java class for Order complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="Order">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="date" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
 *         <element name="subject" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="source" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="target" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <choice minOccurs="0">
 *           <element name="reasonCodeableConcept" type="{http://hl7.org/fhir}CodeableConcept"/>
 *           <element name="reasonReference" type="{http://hl7.org/fhir}Reference"/>
 *         </choice>
 *         <element name="when" type="{http://hl7.org/fhir}Order.When" minOccurs="0"/>
 *         <element name="detail" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Order", propOrder = { "identifier", "date", "subject", "source", "target", "reasonCodeableConcept", "reasonReference", "when", "detail" }) public class Order extends DomainResource implements Equals, HashCode, ToString { protected List identifier; protected DateTime date; protected Reference subject; protected Reference source; protected Reference target; protected CodeableConcept reasonCodeableConcept; protected Reference reasonReference; protected OrderWhen when; @XmlElement(required = true) protected List detail; /** * Gets the value of the identifier 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 identifier property. * *

* For example, to add a new item, do as follows: *

     *    getIdentifier().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Identifier } * * */ public List getIdentifier() { if (identifier == null) { identifier = new ArrayList(); } return this.identifier; } /** * Gets the value of the date property. * * @return * possible object is * {@link DateTime } * */ public DateTime getDate() { return date; } /** * Sets the value of the date property. * * @param value * allowed object is * {@link DateTime } * */ public void setDate(DateTime value) { this.date = value; } /** * Gets the value of the subject property. * * @return * possible object is * {@link Reference } * */ public Reference getSubject() { return subject; } /** * Sets the value of the subject property. * * @param value * allowed object is * {@link Reference } * */ public void setSubject(Reference value) { this.subject = value; } /** * Gets the value of the source property. * * @return * possible object is * {@link Reference } * */ public Reference getSource() { return source; } /** * Sets the value of the source property. * * @param value * allowed object is * {@link Reference } * */ public void setSource(Reference value) { this.source = value; } /** * Gets the value of the target property. * * @return * possible object is * {@link Reference } * */ public Reference getTarget() { return target; } /** * Sets the value of the target property. * * @param value * allowed object is * {@link Reference } * */ public void setTarget(Reference value) { this.target = value; } /** * Gets the value of the reasonCodeableConcept property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getReasonCodeableConcept() { return reasonCodeableConcept; } /** * Sets the value of the reasonCodeableConcept property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setReasonCodeableConcept(CodeableConcept value) { this.reasonCodeableConcept = value; } /** * Gets the value of the reasonReference property. * * @return * possible object is * {@link Reference } * */ public Reference getReasonReference() { return reasonReference; } /** * Sets the value of the reasonReference property. * * @param value * allowed object is * {@link Reference } * */ public void setReasonReference(Reference value) { this.reasonReference = value; } /** * Gets the value of the when property. * * @return * possible object is * {@link OrderWhen } * */ public OrderWhen getWhen() { return when; } /** * Sets the value of the when property. * * @param value * allowed object is * {@link OrderWhen } * */ public void setWhen(OrderWhen value) { this.when = value; } /** * Gets the value of the detail 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 detail property. * *

* For example, to add a new item, do as follows: *

     *    getDetail().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Reference } * * */ public List getDetail() { if (detail == null) { detail = new ArrayList(); } return this.detail; } public Order withIdentifier(Identifier... values) { if (values!= null) { for (Identifier value: values) { getIdentifier().add(value); } } return this; } public Order withIdentifier(Collection values) { if (values!= null) { getIdentifier().addAll(values); } return this; } public Order withDate(DateTime value) { setDate(value); return this; } public Order withSubject(Reference value) { setSubject(value); return this; } public Order withSource(Reference value) { setSource(value); return this; } public Order withTarget(Reference value) { setTarget(value); return this; } public Order withReasonCodeableConcept(CodeableConcept value) { setReasonCodeableConcept(value); return this; } public Order withReasonReference(Reference value) { setReasonReference(value); return this; } public Order withWhen(OrderWhen value) { setWhen(value); return this; } public Order withDetail(Reference... values) { if (values!= null) { for (Reference value: values) { getDetail().add(value); } } return this; } public Order withDetail(Collection values) { if (values!= null) { getDetail().addAll(values); } return this; } @Override public Order withText(Narrative value) { setText(value); return this; } @Override public Order withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public Order withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public Order withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public Order withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public Order withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public Order withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public Order withId(Id value) { setId(value); return this; } @Override public Order withMeta(Meta value) { setMeta(value); return this; } @Override public Order withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public Order withLanguage(Code value) { setLanguage(value); return this; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Order)) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final Order that = ((Order) object); { List lhsIdentifier; lhsIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); List rhsIdentifier; rhsIdentifier = (((that.identifier!= null)&&(!that.identifier.isEmpty()))?that.getIdentifier():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "identifier", lhsIdentifier), LocatorUtils.property(thatLocator, "identifier", rhsIdentifier), lhsIdentifier, rhsIdentifier)) { return false; } } { DateTime lhsDate; lhsDate = this.getDate(); DateTime rhsDate; rhsDate = that.getDate(); if (!strategy.equals(LocatorUtils.property(thisLocator, "date", lhsDate), LocatorUtils.property(thatLocator, "date", rhsDate), lhsDate, rhsDate)) { return false; } } { Reference lhsSubject; lhsSubject = this.getSubject(); Reference rhsSubject; rhsSubject = that.getSubject(); if (!strategy.equals(LocatorUtils.property(thisLocator, "subject", lhsSubject), LocatorUtils.property(thatLocator, "subject", rhsSubject), lhsSubject, rhsSubject)) { return false; } } { Reference lhsSource; lhsSource = this.getSource(); Reference rhsSource; rhsSource = that.getSource(); if (!strategy.equals(LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource)) { return false; } } { Reference lhsTarget; lhsTarget = this.getTarget(); Reference rhsTarget; rhsTarget = that.getTarget(); if (!strategy.equals(LocatorUtils.property(thisLocator, "target", lhsTarget), LocatorUtils.property(thatLocator, "target", rhsTarget), lhsTarget, rhsTarget)) { return false; } } { CodeableConcept lhsReasonCodeableConcept; lhsReasonCodeableConcept = this.getReasonCodeableConcept(); CodeableConcept rhsReasonCodeableConcept; rhsReasonCodeableConcept = that.getReasonCodeableConcept(); if (!strategy.equals(LocatorUtils.property(thisLocator, "reasonCodeableConcept", lhsReasonCodeableConcept), LocatorUtils.property(thatLocator, "reasonCodeableConcept", rhsReasonCodeableConcept), lhsReasonCodeableConcept, rhsReasonCodeableConcept)) { return false; } } { Reference lhsReasonReference; lhsReasonReference = this.getReasonReference(); Reference rhsReasonReference; rhsReasonReference = that.getReasonReference(); if (!strategy.equals(LocatorUtils.property(thisLocator, "reasonReference", lhsReasonReference), LocatorUtils.property(thatLocator, "reasonReference", rhsReasonReference), lhsReasonReference, rhsReasonReference)) { return false; } } { OrderWhen lhsWhen; lhsWhen = this.getWhen(); OrderWhen rhsWhen; rhsWhen = that.getWhen(); if (!strategy.equals(LocatorUtils.property(thisLocator, "when", lhsWhen), LocatorUtils.property(thatLocator, "when", rhsWhen), lhsWhen, rhsWhen)) { return false; } } { List lhsDetail; lhsDetail = (((this.detail!= null)&&(!this.detail.isEmpty()))?this.getDetail():null); List rhsDetail; rhsDetail = (((that.detail!= null)&&(!that.detail.isEmpty()))?that.getDetail():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "detail", lhsDetail), LocatorUtils.property(thatLocator, "detail", rhsDetail), lhsDetail, rhsDetail)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { List theIdentifier; theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier); } { DateTime theDate; theDate = this.getDate(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "date", theDate), currentHashCode, theDate); } { Reference theSubject; theSubject = this.getSubject(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subject", theSubject), currentHashCode, theSubject); } { Reference theSource; theSource = this.getSource(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource); } { Reference theTarget; theTarget = this.getTarget(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "target", theTarget), currentHashCode, theTarget); } { CodeableConcept theReasonCodeableConcept; theReasonCodeableConcept = this.getReasonCodeableConcept(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reasonCodeableConcept", theReasonCodeableConcept), currentHashCode, theReasonCodeableConcept); } { Reference theReasonReference; theReasonReference = this.getReasonReference(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reasonReference", theReasonReference), currentHashCode, theReasonReference); } { OrderWhen theWhen; theWhen = this.getWhen(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "when", theWhen), currentHashCode, theWhen); } { List theDetail; theDetail = (((this.detail!= null)&&(!this.detail.isEmpty()))?this.getDetail():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "detail", theDetail), currentHashCode, theDetail); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public java.lang.String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { List theIdentifier; theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); strategy.appendField(locator, this, "identifier", buffer, theIdentifier); } { DateTime theDate; theDate = this.getDate(); strategy.appendField(locator, this, "date", buffer, theDate); } { Reference theSubject; theSubject = this.getSubject(); strategy.appendField(locator, this, "subject", buffer, theSubject); } { Reference theSource; theSource = this.getSource(); strategy.appendField(locator, this, "source", buffer, theSource); } { Reference theTarget; theTarget = this.getTarget(); strategy.appendField(locator, this, "target", buffer, theTarget); } { CodeableConcept theReasonCodeableConcept; theReasonCodeableConcept = this.getReasonCodeableConcept(); strategy.appendField(locator, this, "reasonCodeableConcept", buffer, theReasonCodeableConcept); } { Reference theReasonReference; theReasonReference = this.getReasonReference(); strategy.appendField(locator, this, "reasonReference", buffer, theReasonReference); } { OrderWhen theWhen; theWhen = this.getWhen(); strategy.appendField(locator, this, "when", buffer, theWhen); } { List theDetail; theDetail = (((this.detail!= null)&&(!this.detail.isEmpty()))?this.getDetail():null); strategy.appendField(locator, this, "detail", buffer, theDetail); } return buffer; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy