org.hl7.fhir.OrderResponse Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2
// See https://eclipse-ee4j.github.io/jaxb-ri
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2024.03.21 at 12:42:34 PM MDT
//
package org.hl7.fhir;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
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;
/**
* If the element is present, it must have either a @value, an @id, or extensions
*
* Java class for OrderResponse complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="OrderResponse">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
* <element name="request" type="{http://hl7.org/fhir}Reference"/>
* <element name="date" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
* <element name="who" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="orderStatus" type="{http://hl7.org/fhir}OrderStatus"/>
* <element name="description" type="{http://hl7.org/fhir}string" minOccurs="0"/>
* <element name="fulfillment" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OrderResponse", propOrder = {
"identifier",
"request",
"date",
"who",
"orderStatus",
"description",
"fulfillment"
})
public class OrderResponse
extends DomainResource
implements Equals2, HashCode2, ToString2
{
protected List identifier;
@XmlElement(required = true)
protected Reference request;
protected DateTime date;
protected Reference who;
@XmlElement(required = true)
protected OrderStatus orderStatus;
protected org.hl7.fhir.String description;
protected List fulfillment;
/**
* 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 Jakarta XML Binding 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 request property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getRequest() {
return request;
}
/**
* Sets the value of the request property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setRequest(Reference value) {
this.request = value;
}
/**
* 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 who property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getWho() {
return who;
}
/**
* Sets the value of the who property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setWho(Reference value) {
this.who = value;
}
/**
* Gets the value of the orderStatus property.
*
* @return
* possible object is
* {@link OrderStatus }
*
*/
public OrderStatus getOrderStatus() {
return orderStatus;
}
/**
* Sets the value of the orderStatus property.
*
* @param value
* allowed object is
* {@link OrderStatus }
*
*/
public void setOrderStatus(OrderStatus value) {
this.orderStatus = value;
}
/**
* Gets the value of the description property.
*
* @return
* possible object is
* {@link org.hl7.fhir.String }
*
*/
public org.hl7.fhir.String getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link org.hl7.fhir.String }
*
*/
public void setDescription(org.hl7.fhir.String value) {
this.description = value;
}
/**
* Gets the value of the fulfillment 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 Jakarta XML Binding object.
* This is why there is not a set
method for the fulfillment property.
*
*
* For example, to add a new item, do as follows:
*
* getFulfillment().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getFulfillment() {
if (fulfillment == null) {
fulfillment = new ArrayList();
}
return this.fulfillment;
}
public OrderResponse withIdentifier(Identifier... values) {
if (values!= null) {
for (Identifier value: values) {
getIdentifier().add(value);
}
}
return this;
}
public OrderResponse withIdentifier(Collection values) {
if (values!= null) {
getIdentifier().addAll(values);
}
return this;
}
public OrderResponse withRequest(Reference value) {
setRequest(value);
return this;
}
public OrderResponse withDate(DateTime value) {
setDate(value);
return this;
}
public OrderResponse withWho(Reference value) {
setWho(value);
return this;
}
public OrderResponse withOrderStatus(OrderStatus value) {
setOrderStatus(value);
return this;
}
public OrderResponse withDescription(org.hl7.fhir.String value) {
setDescription(value);
return this;
}
public OrderResponse withFulfillment(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getFulfillment().add(value);
}
}
return this;
}
public OrderResponse withFulfillment(Collection values) {
if (values!= null) {
getFulfillment().addAll(values);
}
return this;
}
@Override
public OrderResponse withText(Narrative value) {
setText(value);
return this;
}
@Override
public OrderResponse withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public OrderResponse withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public OrderResponse withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public OrderResponse withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public OrderResponse withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public OrderResponse withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public OrderResponse withId(Id value) {
setId(value);
return this;
}
@Override
public OrderResponse withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public OrderResponse withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public OrderResponse withLanguage(Code value) {
setLanguage(value);
return this;
}
@Override
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final OrderResponse that = ((OrderResponse) 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, ((this.identifier!= null)&&(!this.identifier.isEmpty())), ((that.identifier!= null)&&(!that.identifier.isEmpty())))) {
return false;
}
}
{
Reference lhsRequest;
lhsRequest = this.getRequest();
Reference rhsRequest;
rhsRequest = that.getRequest();
if (!strategy.equals(LocatorUtils.property(thisLocator, "request", lhsRequest), LocatorUtils.property(thatLocator, "request", rhsRequest), lhsRequest, rhsRequest, (this.request!= null), (that.request!= null))) {
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, (this.date!= null), (that.date!= null))) {
return false;
}
}
{
Reference lhsWho;
lhsWho = this.getWho();
Reference rhsWho;
rhsWho = that.getWho();
if (!strategy.equals(LocatorUtils.property(thisLocator, "who", lhsWho), LocatorUtils.property(thatLocator, "who", rhsWho), lhsWho, rhsWho, (this.who!= null), (that.who!= null))) {
return false;
}
}
{
OrderStatus lhsOrderStatus;
lhsOrderStatus = this.getOrderStatus();
OrderStatus rhsOrderStatus;
rhsOrderStatus = that.getOrderStatus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "orderStatus", lhsOrderStatus), LocatorUtils.property(thatLocator, "orderStatus", rhsOrderStatus), lhsOrderStatus, rhsOrderStatus, (this.orderStatus!= null), (that.orderStatus!= null))) {
return false;
}
}
{
org.hl7.fhir.String lhsDescription;
lhsDescription = this.getDescription();
org.hl7.fhir.String rhsDescription;
rhsDescription = that.getDescription();
if (!strategy.equals(LocatorUtils.property(thisLocator, "description", lhsDescription), LocatorUtils.property(thatLocator, "description", rhsDescription), lhsDescription, rhsDescription, (this.description!= null), (that.description!= null))) {
return false;
}
}
{
List lhsFulfillment;
lhsFulfillment = (((this.fulfillment!= null)&&(!this.fulfillment.isEmpty()))?this.getFulfillment():null);
List rhsFulfillment;
rhsFulfillment = (((that.fulfillment!= null)&&(!that.fulfillment.isEmpty()))?that.getFulfillment():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "fulfillment", lhsFulfillment), LocatorUtils.property(thatLocator, "fulfillment", rhsFulfillment), lhsFulfillment, rhsFulfillment, ((this.fulfillment!= null)&&(!this.fulfillment.isEmpty())), ((that.fulfillment!= null)&&(!that.fulfillment.isEmpty())))) {
return false;
}
}
return true;
}
@Override
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance();
return equals(null, null, object, strategy);
}
@Override
public int hashCode(ObjectLocator locator, HashCodeStrategy2 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, ((this.identifier!= null)&&(!this.identifier.isEmpty())));
}
{
Reference theRequest;
theRequest = this.getRequest();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "request", theRequest), currentHashCode, theRequest, (this.request!= null));
}
{
DateTime theDate;
theDate = this.getDate();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "date", theDate), currentHashCode, theDate, (this.date!= null));
}
{
Reference theWho;
theWho = this.getWho();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "who", theWho), currentHashCode, theWho, (this.who!= null));
}
{
OrderStatus theOrderStatus;
theOrderStatus = this.getOrderStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderStatus", theOrderStatus), currentHashCode, theOrderStatus, (this.orderStatus!= null));
}
{
org.hl7.fhir.String theDescription;
theDescription = this.getDescription();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "description", theDescription), currentHashCode, theDescription, (this.description!= null));
}
{
List theFulfillment;
theFulfillment = (((this.fulfillment!= null)&&(!this.fulfillment.isEmpty()))?this.getFulfillment():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "fulfillment", theFulfillment), currentHashCode, theFulfillment, ((this.fulfillment!= null)&&(!this.fulfillment.isEmpty())));
}
return currentHashCode;
}
@Override
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance();
return this.hashCode(null, strategy);
}
@Override
public java.lang.String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 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, ((this.identifier!= null)&&(!this.identifier.isEmpty())));
}
{
Reference theRequest;
theRequest = this.getRequest();
strategy.appendField(locator, this, "request", buffer, theRequest, (this.request!= null));
}
{
DateTime theDate;
theDate = this.getDate();
strategy.appendField(locator, this, "date", buffer, theDate, (this.date!= null));
}
{
Reference theWho;
theWho = this.getWho();
strategy.appendField(locator, this, "who", buffer, theWho, (this.who!= null));
}
{
OrderStatus theOrderStatus;
theOrderStatus = this.getOrderStatus();
strategy.appendField(locator, this, "orderStatus", buffer, theOrderStatus, (this.orderStatus!= null));
}
{
org.hl7.fhir.String theDescription;
theDescription = this.getDescription();
strategy.appendField(locator, this, "description", buffer, theDescription, (this.description!= null));
}
{
List theFulfillment;
theFulfillment = (((this.fulfillment!= null)&&(!this.fulfillment.isEmpty()))?this.getFulfillment():null);
strategy.appendField(locator, this, "fulfillment", buffer, theFulfillment, ((this.fulfillment!= null)&&(!this.fulfillment.isEmpty())));
}
return buffer;
}
public void setIdentifier(List value) {
this.identifier = value;
}
public void setFulfillment(List value) {
this.fulfillment = value;
}
}