
org.hl7.fhir.SupplyDelivery Maven / Gradle / Ivy
Show all versions of quick Show documentation
//
// 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.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 SupplyDelivery complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="SupplyDelivery">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier" minOccurs="0"/>
* <element name="status" type="{http://hl7.org/fhir}SupplyDeliveryStatus" minOccurs="0"/>
* <element name="patient" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="type" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="quantity" type="{http://hl7.org/fhir}SimpleQuantity" minOccurs="0"/>
* <element name="suppliedItem" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="supplier" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="whenPrepared" type="{http://hl7.org/fhir}Period" minOccurs="0"/>
* <element name="time" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
* <element name="destination" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
* <element name="receiver" type="{http://hl7.org/fhir}Reference" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SupplyDelivery", propOrder = {
"identifier",
"status",
"patient",
"type",
"quantity",
"suppliedItem",
"supplier",
"whenPrepared",
"time",
"destination",
"receiver"
})
public class SupplyDelivery
extends DomainResource
implements Equals, HashCode, ToString
{
protected Identifier identifier;
protected SupplyDeliveryStatus status;
protected Reference patient;
protected CodeableConcept type;
protected SimpleQuantity quantity;
protected Reference suppliedItem;
protected Reference supplier;
protected Period whenPrepared;
protected DateTime time;
protected Reference destination;
protected List receiver;
/**
* Gets the value of the identifier property.
*
* @return
* possible object is
* {@link Identifier }
*
*/
public Identifier getIdentifier() {
return identifier;
}
/**
* Sets the value of the identifier property.
*
* @param value
* allowed object is
* {@link Identifier }
*
*/
public void setIdentifier(Identifier value) {
this.identifier = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link SupplyDeliveryStatus }
*
*/
public SupplyDeliveryStatus getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link SupplyDeliveryStatus }
*
*/
public void setStatus(SupplyDeliveryStatus value) {
this.status = value;
}
/**
* Gets the value of the patient property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getPatient() {
return patient;
}
/**
* Sets the value of the patient property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setPatient(Reference value) {
this.patient = value;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link CodeableConcept }
*
*/
public CodeableConcept getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link CodeableConcept }
*
*/
public void setType(CodeableConcept value) {
this.type = value;
}
/**
* Gets the value of the quantity property.
*
* @return
* possible object is
* {@link SimpleQuantity }
*
*/
public SimpleQuantity getQuantity() {
return quantity;
}
/**
* Sets the value of the quantity property.
*
* @param value
* allowed object is
* {@link SimpleQuantity }
*
*/
public void setQuantity(SimpleQuantity value) {
this.quantity = value;
}
/**
* Gets the value of the suppliedItem property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getSuppliedItem() {
return suppliedItem;
}
/**
* Sets the value of the suppliedItem property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setSuppliedItem(Reference value) {
this.suppliedItem = value;
}
/**
* Gets the value of the supplier property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getSupplier() {
return supplier;
}
/**
* Sets the value of the supplier property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setSupplier(Reference value) {
this.supplier = value;
}
/**
* Gets the value of the whenPrepared property.
*
* @return
* possible object is
* {@link Period }
*
*/
public Period getWhenPrepared() {
return whenPrepared;
}
/**
* Sets the value of the whenPrepared property.
*
* @param value
* allowed object is
* {@link Period }
*
*/
public void setWhenPrepared(Period value) {
this.whenPrepared = value;
}
/**
* Gets the value of the time property.
*
* @return
* possible object is
* {@link DateTime }
*
*/
public DateTime getTime() {
return time;
}
/**
* Sets the value of the time property.
*
* @param value
* allowed object is
* {@link DateTime }
*
*/
public void setTime(DateTime value) {
this.time = value;
}
/**
* Gets the value of the destination property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getDestination() {
return destination;
}
/**
* Sets the value of the destination property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setDestination(Reference value) {
this.destination = value;
}
/**
* Gets the value of the receiver 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 receiver property.
*
*
* For example, to add a new item, do as follows:
*
* getReceiver().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Reference }
*
*
*/
public List getReceiver() {
if (receiver == null) {
receiver = new ArrayList();
}
return this.receiver;
}
public SupplyDelivery withIdentifier(Identifier value) {
setIdentifier(value);
return this;
}
public SupplyDelivery withStatus(SupplyDeliveryStatus value) {
setStatus(value);
return this;
}
public SupplyDelivery withPatient(Reference value) {
setPatient(value);
return this;
}
public SupplyDelivery withType(CodeableConcept value) {
setType(value);
return this;
}
public SupplyDelivery withQuantity(SimpleQuantity value) {
setQuantity(value);
return this;
}
public SupplyDelivery withSuppliedItem(Reference value) {
setSuppliedItem(value);
return this;
}
public SupplyDelivery withSupplier(Reference value) {
setSupplier(value);
return this;
}
public SupplyDelivery withWhenPrepared(Period value) {
setWhenPrepared(value);
return this;
}
public SupplyDelivery withTime(DateTime value) {
setTime(value);
return this;
}
public SupplyDelivery withDestination(Reference value) {
setDestination(value);
return this;
}
public SupplyDelivery withReceiver(Reference... values) {
if (values!= null) {
for (Reference value: values) {
getReceiver().add(value);
}
}
return this;
}
public SupplyDelivery withReceiver(Collection values) {
if (values!= null) {
getReceiver().addAll(values);
}
return this;
}
@Override
public SupplyDelivery withText(Narrative value) {
setText(value);
return this;
}
@Override
public SupplyDelivery withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public SupplyDelivery withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public SupplyDelivery withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public SupplyDelivery withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public SupplyDelivery withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public SupplyDelivery withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public SupplyDelivery withId(Id value) {
setId(value);
return this;
}
@Override
public SupplyDelivery withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public SupplyDelivery withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public SupplyDelivery withLanguage(Code value) {
setLanguage(value);
return this;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof SupplyDelivery)) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final SupplyDelivery that = ((SupplyDelivery) object);
{
Identifier lhsIdentifier;
lhsIdentifier = this.getIdentifier();
Identifier rhsIdentifier;
rhsIdentifier = that.getIdentifier();
if (!strategy.equals(LocatorUtils.property(thisLocator, "identifier", lhsIdentifier), LocatorUtils.property(thatLocator, "identifier", rhsIdentifier), lhsIdentifier, rhsIdentifier)) {
return false;
}
}
{
SupplyDeliveryStatus lhsStatus;
lhsStatus = this.getStatus();
SupplyDeliveryStatus rhsStatus;
rhsStatus = that.getStatus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus)) {
return false;
}
}
{
Reference lhsPatient;
lhsPatient = this.getPatient();
Reference rhsPatient;
rhsPatient = that.getPatient();
if (!strategy.equals(LocatorUtils.property(thisLocator, "patient", lhsPatient), LocatorUtils.property(thatLocator, "patient", rhsPatient), lhsPatient, rhsPatient)) {
return false;
}
}
{
CodeableConcept lhsType;
lhsType = this.getType();
CodeableConcept rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) {
return false;
}
}
{
SimpleQuantity lhsQuantity;
lhsQuantity = this.getQuantity();
SimpleQuantity rhsQuantity;
rhsQuantity = that.getQuantity();
if (!strategy.equals(LocatorUtils.property(thisLocator, "quantity", lhsQuantity), LocatorUtils.property(thatLocator, "quantity", rhsQuantity), lhsQuantity, rhsQuantity)) {
return false;
}
}
{
Reference lhsSuppliedItem;
lhsSuppliedItem = this.getSuppliedItem();
Reference rhsSuppliedItem;
rhsSuppliedItem = that.getSuppliedItem();
if (!strategy.equals(LocatorUtils.property(thisLocator, "suppliedItem", lhsSuppliedItem), LocatorUtils.property(thatLocator, "suppliedItem", rhsSuppliedItem), lhsSuppliedItem, rhsSuppliedItem)) {
return false;
}
}
{
Reference lhsSupplier;
lhsSupplier = this.getSupplier();
Reference rhsSupplier;
rhsSupplier = that.getSupplier();
if (!strategy.equals(LocatorUtils.property(thisLocator, "supplier", lhsSupplier), LocatorUtils.property(thatLocator, "supplier", rhsSupplier), lhsSupplier, rhsSupplier)) {
return false;
}
}
{
Period lhsWhenPrepared;
lhsWhenPrepared = this.getWhenPrepared();
Period rhsWhenPrepared;
rhsWhenPrepared = that.getWhenPrepared();
if (!strategy.equals(LocatorUtils.property(thisLocator, "whenPrepared", lhsWhenPrepared), LocatorUtils.property(thatLocator, "whenPrepared", rhsWhenPrepared), lhsWhenPrepared, rhsWhenPrepared)) {
return false;
}
}
{
DateTime lhsTime;
lhsTime = this.getTime();
DateTime rhsTime;
rhsTime = that.getTime();
if (!strategy.equals(LocatorUtils.property(thisLocator, "time", lhsTime), LocatorUtils.property(thatLocator, "time", rhsTime), lhsTime, rhsTime)) {
return false;
}
}
{
Reference lhsDestination;
lhsDestination = this.getDestination();
Reference rhsDestination;
rhsDestination = that.getDestination();
if (!strategy.equals(LocatorUtils.property(thisLocator, "destination", lhsDestination), LocatorUtils.property(thatLocator, "destination", rhsDestination), lhsDestination, rhsDestination)) {
return false;
}
}
{
List lhsReceiver;
lhsReceiver = (((this.receiver!= null)&&(!this.receiver.isEmpty()))?this.getReceiver():null);
List rhsReceiver;
rhsReceiver = (((that.receiver!= null)&&(!that.receiver.isEmpty()))?that.getReceiver():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "receiver", lhsReceiver), LocatorUtils.property(thatLocator, "receiver", rhsReceiver), lhsReceiver, rhsReceiver)) {
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);
{
Identifier theIdentifier;
theIdentifier = this.getIdentifier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier);
}
{
SupplyDeliveryStatus theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus);
}
{
Reference thePatient;
thePatient = this.getPatient();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "patient", thePatient), currentHashCode, thePatient);
}
{
CodeableConcept theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType);
}
{
SimpleQuantity theQuantity;
theQuantity = this.getQuantity();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "quantity", theQuantity), currentHashCode, theQuantity);
}
{
Reference theSuppliedItem;
theSuppliedItem = this.getSuppliedItem();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "suppliedItem", theSuppliedItem), currentHashCode, theSuppliedItem);
}
{
Reference theSupplier;
theSupplier = this.getSupplier();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "supplier", theSupplier), currentHashCode, theSupplier);
}
{
Period theWhenPrepared;
theWhenPrepared = this.getWhenPrepared();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "whenPrepared", theWhenPrepared), currentHashCode, theWhenPrepared);
}
{
DateTime theTime;
theTime = this.getTime();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "time", theTime), currentHashCode, theTime);
}
{
Reference theDestination;
theDestination = this.getDestination();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "destination", theDestination), currentHashCode, theDestination);
}
{
List theReceiver;
theReceiver = (((this.receiver!= null)&&(!this.receiver.isEmpty()))?this.getReceiver():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "receiver", theReceiver), currentHashCode, theReceiver);
}
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);
{
Identifier theIdentifier;
theIdentifier = this.getIdentifier();
strategy.appendField(locator, this, "identifier", buffer, theIdentifier);
}
{
SupplyDeliveryStatus theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus);
}
{
Reference thePatient;
thePatient = this.getPatient();
strategy.appendField(locator, this, "patient", buffer, thePatient);
}
{
CodeableConcept theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType);
}
{
SimpleQuantity theQuantity;
theQuantity = this.getQuantity();
strategy.appendField(locator, this, "quantity", buffer, theQuantity);
}
{
Reference theSuppliedItem;
theSuppliedItem = this.getSuppliedItem();
strategy.appendField(locator, this, "suppliedItem", buffer, theSuppliedItem);
}
{
Reference theSupplier;
theSupplier = this.getSupplier();
strategy.appendField(locator, this, "supplier", buffer, theSupplier);
}
{
Period theWhenPrepared;
theWhenPrepared = this.getWhenPrepared();
strategy.appendField(locator, this, "whenPrepared", buffer, theWhenPrepared);
}
{
DateTime theTime;
theTime = this.getTime();
strategy.appendField(locator, this, "time", buffer, theTime);
}
{
Reference theDestination;
theDestination = this.getDestination();
strategy.appendField(locator, this, "destination", buffer, theDestination);
}
{
List theReceiver;
theReceiver = (((this.receiver!= null)&&(!this.receiver.isEmpty()))?this.getReceiver():null);
strategy.appendField(locator, this, "receiver", buffer, theReceiver);
}
return buffer;
}
}