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

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

Go to download

The quick library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.18.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 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 Bundle complex type. * *

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

 * <complexType name="Bundle">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}Resource">
 *       <sequence>
 *         <element name="type" type="{http://hl7.org/fhir}BundleType"/>
 *         <element name="total" type="{http://hl7.org/fhir}unsignedInt" minOccurs="0"/>
 *         <element name="link" type="{http://hl7.org/fhir}Bundle.Link" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="entry" type="{http://hl7.org/fhir}Bundle.Entry" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="signature" type="{http://hl7.org/fhir}Signature" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Bundle", propOrder = { "type", "total", "link", "entry", "signature" }) public class Bundle extends Resource implements Equals2, HashCode2, ToString2 { @XmlElement(required = true) protected BundleType type; protected UnsignedInt total; protected List link; protected List entry; protected Signature signature; /** * Gets the value of the type property. * * @return * possible object is * {@link BundleType } * */ public BundleType getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link BundleType } * */ public void setType(BundleType value) { this.type = value; } /** * Gets the value of the total property. * * @return * possible object is * {@link UnsignedInt } * */ public UnsignedInt getTotal() { return total; } /** * Sets the value of the total property. * * @param value * allowed object is * {@link UnsignedInt } * */ public void setTotal(UnsignedInt value) { this.total = value; } /** * Gets the value of the link 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 link property. * *

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

     *    getLink().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link BundleLink } * * */ public List getLink() { if (link == null) { link = new ArrayList(); } return this.link; } /** * 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 BundleEntry } * * */ public List getEntry() { if (entry == null) { entry = new ArrayList(); } return this.entry; } /** * Gets the value of the signature property. * * @return * possible object is * {@link Signature } * */ public Signature getSignature() { return signature; } /** * Sets the value of the signature property. * * @param value * allowed object is * {@link Signature } * */ public void setSignature(Signature value) { this.signature = value; } public Bundle withType(BundleType value) { setType(value); return this; } public Bundle withTotal(UnsignedInt value) { setTotal(value); return this; } public Bundle withLink(BundleLink... values) { if (values!= null) { for (BundleLink value: values) { getLink().add(value); } } return this; } public Bundle withLink(Collection values) { if (values!= null) { getLink().addAll(values); } return this; } public Bundle withEntry(BundleEntry... values) { if (values!= null) { for (BundleEntry value: values) { getEntry().add(value); } } return this; } public Bundle withEntry(Collection values) { if (values!= null) { getEntry().addAll(values); } return this; } public Bundle withSignature(Signature value) { setSignature(value); return this; } @Override public Bundle withId(Id value) { setId(value); return this; } @Override public Bundle withMeta(Meta value) { setMeta(value); return this; } @Override public Bundle withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public Bundle 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 Bundle that = ((Bundle) object); { BundleType lhsType; lhsType = this.getType(); BundleType rhsType; rhsType = that.getType(); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, (this.type!= null), (that.type!= null))) { return false; } } { UnsignedInt lhsTotal; lhsTotal = this.getTotal(); UnsignedInt rhsTotal; rhsTotal = that.getTotal(); if (!strategy.equals(LocatorUtils.property(thisLocator, "total", lhsTotal), LocatorUtils.property(thatLocator, "total", rhsTotal), lhsTotal, rhsTotal, (this.total!= null), (that.total!= null))) { return false; } } { List lhsLink; lhsLink = (((this.link!= null)&&(!this.link.isEmpty()))?this.getLink():null); List rhsLink; rhsLink = (((that.link!= null)&&(!that.link.isEmpty()))?that.getLink():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "link", lhsLink), LocatorUtils.property(thatLocator, "link", rhsLink), lhsLink, rhsLink, ((this.link!= null)&&(!this.link.isEmpty())), ((that.link!= null)&&(!that.link.isEmpty())))) { return false; } } { List lhsEntry; lhsEntry = (((this.entry!= null)&&(!this.entry.isEmpty()))?this.getEntry():null); 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; } } { Signature lhsSignature; lhsSignature = this.getSignature(); Signature rhsSignature; rhsSignature = that.getSignature(); if (!strategy.equals(LocatorUtils.property(thisLocator, "signature", lhsSignature), LocatorUtils.property(thatLocator, "signature", rhsSignature), lhsSignature, rhsSignature, (this.signature!= null), (that.signature!= 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); { BundleType theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null)); } { UnsignedInt theTotal; theTotal = this.getTotal(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "total", theTotal), currentHashCode, theTotal, (this.total!= null)); } { List theLink; theLink = (((this.link!= null)&&(!this.link.isEmpty()))?this.getLink():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "link", theLink), currentHashCode, theLink, ((this.link!= null)&&(!this.link.isEmpty()))); } { 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()))); } { Signature theSignature; theSignature = this.getSignature(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "signature", theSignature), currentHashCode, theSignature, (this.signature!= 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); { BundleType theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null)); } { UnsignedInt theTotal; theTotal = this.getTotal(); strategy.appendField(locator, this, "total", buffer, theTotal, (this.total!= null)); } { List theLink; theLink = (((this.link!= null)&&(!this.link.isEmpty()))?this.getLink():null); strategy.appendField(locator, this, "link", buffer, theLink, ((this.link!= null)&&(!this.link.isEmpty()))); } { 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()))); } { Signature theSignature; theSignature = this.getSignature(); strategy.appendField(locator, this, "signature", buffer, theSignature, (this.signature!= null)); } return buffer; } public void setLink(List value) { this.link = value; } public void setEntry(List value) { this.entry = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy