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

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

Go to download

The quick library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.15.0
Show newest version
//
// 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.08.16 at 09:36:55 AM MDT 
//


package org.hl7.fhir;

import java.util.ArrayList;
import java.util.Collection;
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 List complex type. * *

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

 * <complexType name="List">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="status" type="{http://hl7.org/fhir}ListStatus"/>
 *         <element name="mode" type="{http://hl7.org/fhir}ListMode"/>
 *         <element name="title" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="code" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="subject" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="encounter" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="date" type="{http://hl7.org/fhir}dateTime" minOccurs="0"/>
 *         <element name="source" type="{http://hl7.org/fhir}Reference" minOccurs="0"/>
 *         <element name="orderedBy" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *         <element name="note" type="{http://hl7.org/fhir}Annotation" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="entry" type="{http://hl7.org/fhir}List.Entry" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="emptyReason" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "List", propOrder = { "identifier", "status", "mode", "title", "code", "subject", "encounter", "date", "source", "orderedBy", "note", "entry", "emptyReason" }) public class List extends DomainResource implements Equals2, HashCode2, ToString2 { protected java.util.List identifier; @XmlElement(required = true) protected ListStatus status; @XmlElement(required = true) protected ListMode mode; protected org.hl7.fhir.String title; protected CodeableConcept code; protected Reference subject; protected Reference encounter; protected DateTime date; protected Reference source; protected CodeableConcept orderedBy; protected java.util.List note; protected java.util.List entry; protected CodeableConcept emptyReason; /** * 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 java.util.List getIdentifier() { if (identifier == null) { identifier = new ArrayList(); } return this.identifier; } /** * Gets the value of the status property. * * @return * possible object is * {@link ListStatus } * */ public ListStatus getStatus() { return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link ListStatus } * */ public void setStatus(ListStatus value) { this.status = value; } /** * Gets the value of the mode property. * * @return * possible object is * {@link ListMode } * */ public ListMode getMode() { return mode; } /** * Sets the value of the mode property. * * @param value * allowed object is * {@link ListMode } * */ public void setMode(ListMode value) { this.mode = value; } /** * Gets the value of the title property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getTitle() { return title; } /** * Sets the value of the title property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setTitle(org.hl7.fhir.String value) { this.title = value; } /** * Gets the value of the code property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getCode() { return code; } /** * Sets the value of the code property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setCode(CodeableConcept value) { this.code = 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 encounter property. * * @return * possible object is * {@link Reference } * */ public Reference getEncounter() { return encounter; } /** * Sets the value of the encounter property. * * @param value * allowed object is * {@link Reference } * */ public void setEncounter(Reference value) { this.encounter = 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 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 orderedBy property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getOrderedBy() { return orderedBy; } /** * Sets the value of the orderedBy property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setOrderedBy(CodeableConcept value) { this.orderedBy = value; } /** * Gets the value of the note 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 note property. * *

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

     *    getNote().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Annotation } * * */ public java.util.List getNote() { if (note == null) { note = new ArrayList(); } return this.note; } /** * Gets the value of the entry 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 entry property. * *

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

     *    getEntry().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ListEntry } * * */ public java.util.List getEntry() { if (entry == null) { entry = new ArrayList(); } return this.entry; } /** * Gets the value of the emptyReason property. * * @return * possible object is * {@link CodeableConcept } * */ public CodeableConcept getEmptyReason() { return emptyReason; } /** * Sets the value of the emptyReason property. * * @param value * allowed object is * {@link CodeableConcept } * */ public void setEmptyReason(CodeableConcept value) { this.emptyReason = value; } public List withIdentifier(Identifier... values) { if (values!= null) { for (Identifier value: values) { getIdentifier().add(value); } } return this; } public List withIdentifier(Collection values) { if (values!= null) { getIdentifier().addAll(values); } return this; } public List withStatus(ListStatus value) { setStatus(value); return this; } public List withMode(ListMode value) { setMode(value); return this; } public List withTitle(org.hl7.fhir.String value) { setTitle(value); return this; } public List withCode(CodeableConcept value) { setCode(value); return this; } public List withSubject(Reference value) { setSubject(value); return this; } public List withEncounter(Reference value) { setEncounter(value); return this; } public List withDate(DateTime value) { setDate(value); return this; } public List withSource(Reference value) { setSource(value); return this; } public List withOrderedBy(CodeableConcept value) { setOrderedBy(value); return this; } public List withNote(Annotation... values) { if (values!= null) { for (Annotation value: values) { getNote().add(value); } } return this; } public List withNote(Collection values) { if (values!= null) { getNote().addAll(values); } return this; } public List withEntry(ListEntry... values) { if (values!= null) { for (ListEntry value: values) { getEntry().add(value); } } return this; } public List withEntry(Collection values) { if (values!= null) { getEntry().addAll(values); } return this; } public List withEmptyReason(CodeableConcept value) { setEmptyReason(value); return this; } @Override public List withText(Narrative value) { setText(value); return this; } @Override public List withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public List withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public List withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public List withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public List withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public List withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public List withId(Id value) { setId(value); return this; } @Override public List withMeta(Meta value) { setMeta(value); return this; } @Override public List withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public List 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 List that = ((List) object); { java.util.List lhsIdentifier; lhsIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null); java.util.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; } } { ListStatus lhsStatus; lhsStatus = this.getStatus(); ListStatus rhsStatus; rhsStatus = that.getStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus, (this.status!= null), (that.status!= null))) { return false; } } { ListMode lhsMode; lhsMode = this.getMode(); ListMode rhsMode; rhsMode = that.getMode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "mode", lhsMode), LocatorUtils.property(thatLocator, "mode", rhsMode), lhsMode, rhsMode, (this.mode!= null), (that.mode!= null))) { return false; } } { org.hl7.fhir.String lhsTitle; lhsTitle = this.getTitle(); org.hl7.fhir.String rhsTitle; rhsTitle = that.getTitle(); if (!strategy.equals(LocatorUtils.property(thisLocator, "title", lhsTitle), LocatorUtils.property(thatLocator, "title", rhsTitle), lhsTitle, rhsTitle, (this.title!= null), (that.title!= null))) { return false; } } { CodeableConcept lhsCode; lhsCode = this.getCode(); CodeableConcept rhsCode; rhsCode = that.getCode(); if (!strategy.equals(LocatorUtils.property(thisLocator, "code", lhsCode), LocatorUtils.property(thatLocator, "code", rhsCode), lhsCode, rhsCode, (this.code!= null), (that.code!= null))) { 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, (this.subject!= null), (that.subject!= null))) { return false; } } { Reference lhsEncounter; lhsEncounter = this.getEncounter(); Reference rhsEncounter; rhsEncounter = that.getEncounter(); if (!strategy.equals(LocatorUtils.property(thisLocator, "encounter", lhsEncounter), LocatorUtils.property(thatLocator, "encounter", rhsEncounter), lhsEncounter, rhsEncounter, (this.encounter!= null), (that.encounter!= 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 lhsSource; lhsSource = this.getSource(); Reference rhsSource; rhsSource = that.getSource(); if (!strategy.equals(LocatorUtils.property(thisLocator, "source", lhsSource), LocatorUtils.property(thatLocator, "source", rhsSource), lhsSource, rhsSource, (this.source!= null), (that.source!= null))) { return false; } } { CodeableConcept lhsOrderedBy; lhsOrderedBy = this.getOrderedBy(); CodeableConcept rhsOrderedBy; rhsOrderedBy = that.getOrderedBy(); if (!strategy.equals(LocatorUtils.property(thisLocator, "orderedBy", lhsOrderedBy), LocatorUtils.property(thatLocator, "orderedBy", rhsOrderedBy), lhsOrderedBy, rhsOrderedBy, (this.orderedBy!= null), (that.orderedBy!= null))) { return false; } } { java.util.List lhsNote; lhsNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); java.util.List rhsNote; rhsNote = (((that.note!= null)&&(!that.note.isEmpty()))?that.getNote():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "note", lhsNote), LocatorUtils.property(thatLocator, "note", rhsNote), lhsNote, rhsNote, ((this.note!= null)&&(!this.note.isEmpty())), ((that.note!= null)&&(!that.note.isEmpty())))) { return false; } } { java.util.List lhsEntry; lhsEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); java.util.List rhsEntry; rhsEntry = (((that.entry!= null)&&(!that.entry.isEmpty()))?that.getEntry():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "entry", lhsEntry), LocatorUtils.property(thatLocator, "entry", rhsEntry), lhsEntry, rhsEntry, ((this.entry!= null)&&(!this.entry.isEmpty())), ((that.entry!= null)&&(!that.entry.isEmpty())))) { return false; } } { CodeableConcept lhsEmptyReason; lhsEmptyReason = this.getEmptyReason(); CodeableConcept rhsEmptyReason; rhsEmptyReason = that.getEmptyReason(); if (!strategy.equals(LocatorUtils.property(thisLocator, "emptyReason", lhsEmptyReason), LocatorUtils.property(thatLocator, "emptyReason", rhsEmptyReason), lhsEmptyReason, rhsEmptyReason, (this.emptyReason!= null), (that.emptyReason!= null))) { 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); { java.util.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()))); } { ListStatus theStatus; theStatus = this.getStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null)); } { ListMode theMode; theMode = this.getMode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "mode", theMode), currentHashCode, theMode, (this.mode!= null)); } { org.hl7.fhir.String theTitle; theTitle = this.getTitle(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "title", theTitle), currentHashCode, theTitle, (this.title!= null)); } { CodeableConcept theCode; theCode = this.getCode(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode, (this.code!= null)); } { Reference theSubject; theSubject = this.getSubject(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subject", theSubject), currentHashCode, theSubject, (this.subject!= null)); } { Reference theEncounter; theEncounter = this.getEncounter(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "encounter", theEncounter), currentHashCode, theEncounter, (this.encounter!= null)); } { DateTime theDate; theDate = this.getDate(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "date", theDate), currentHashCode, theDate, (this.date!= null)); } { Reference theSource; theSource = this.getSource(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource, (this.source!= null)); } { CodeableConcept theOrderedBy; theOrderedBy = this.getOrderedBy(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderedBy", theOrderedBy), currentHashCode, theOrderedBy, (this.orderedBy!= null)); } { java.util.List theNote; theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "note", theNote), currentHashCode, theNote, ((this.note!= null)&&(!this.note.isEmpty()))); } { java.util.List theEntry; theEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "entry", theEntry), currentHashCode, theEntry, ((this.entry!= null)&&(!this.entry.isEmpty()))); } { CodeableConcept theEmptyReason; theEmptyReason = this.getEmptyReason(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "emptyReason", theEmptyReason), currentHashCode, theEmptyReason, (this.emptyReason!= null)); } 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); { java.util.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()))); } { ListStatus theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null)); } { ListMode theMode; theMode = this.getMode(); strategy.appendField(locator, this, "mode", buffer, theMode, (this.mode!= null)); } { org.hl7.fhir.String theTitle; theTitle = this.getTitle(); strategy.appendField(locator, this, "title", buffer, theTitle, (this.title!= null)); } { CodeableConcept theCode; theCode = this.getCode(); strategy.appendField(locator, this, "code", buffer, theCode, (this.code!= null)); } { Reference theSubject; theSubject = this.getSubject(); strategy.appendField(locator, this, "subject", buffer, theSubject, (this.subject!= null)); } { Reference theEncounter; theEncounter = this.getEncounter(); strategy.appendField(locator, this, "encounter", buffer, theEncounter, (this.encounter!= null)); } { DateTime theDate; theDate = this.getDate(); strategy.appendField(locator, this, "date", buffer, theDate, (this.date!= null)); } { Reference theSource; theSource = this.getSource(); strategy.appendField(locator, this, "source", buffer, theSource, (this.source!= null)); } { CodeableConcept theOrderedBy; theOrderedBy = this.getOrderedBy(); strategy.appendField(locator, this, "orderedBy", buffer, theOrderedBy, (this.orderedBy!= null)); } { java.util.List theNote; theNote = (((this.note!= null)&&(!this.note.isEmpty()))?this.getNote():null); strategy.appendField(locator, this, "note", buffer, theNote, ((this.note!= null)&&(!this.note.isEmpty()))); } { java.util.List theEntry; theEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); strategy.appendField(locator, this, "entry", buffer, theEntry, ((this.entry!= null)&&(!this.entry.isEmpty()))); } { CodeableConcept theEmptyReason; theEmptyReason = this.getEmptyReason(); strategy.appendField(locator, this, "emptyReason", buffer, theEmptyReason, (this.emptyReason!= null)); } return buffer; } public void setIdentifier(java.util.List value) { this.identifier = value; } public void setNote(java.util.List value) { this.note = value; } public void setEntry(java.util.List value) { this.entry = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy