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

org.hl7.fhir.NutritionOrderOralDiet 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.09.27 at 11:16:19 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.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;


/**
 * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
 * 
 * 

Java class for NutritionOrder.OralDiet complex type. * *

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

 * <complexType name="NutritionOrder.OralDiet">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}BackboneElement">
 *       <sequence>
 *         <element name="type" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="schedule" type="{http://hl7.org/fhir}Timing" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="nutrient" type="{http://hl7.org/fhir}NutritionOrder.Nutrient" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="texture" type="{http://hl7.org/fhir}NutritionOrder.Texture" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="fluidConsistencyType" type="{http://hl7.org/fhir}CodeableConcept" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="instruction" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "NutritionOrder.OralDiet", propOrder = { "type", "schedule", "nutrient", "texture", "fluidConsistencyType", "instruction" }) public class NutritionOrderOralDiet extends BackboneElement implements Equals2, HashCode2, ToString2 { protected List type; protected List schedule; protected List nutrient; protected List texture; protected List fluidConsistencyType; protected org.hl7.fhir.String instruction; /** * Gets the value of the type 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 type property. * *

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

     *    getType().add(newItem);
     * 
* * *

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

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

     *    getSchedule().add(newItem);
     * 
* * *

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

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

     *    getNutrient().add(newItem);
     * 
* * *

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

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

     *    getTexture().add(newItem);
     * 
* * *

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

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

     *    getFluidConsistencyType().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link CodeableConcept } * * */ public List getFluidConsistencyType() { if (fluidConsistencyType == null) { fluidConsistencyType = new ArrayList(); } return this.fluidConsistencyType; } /** * Gets the value of the instruction property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getInstruction() { return instruction; } /** * Sets the value of the instruction property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setInstruction(org.hl7.fhir.String value) { this.instruction = value; } public NutritionOrderOralDiet withType(CodeableConcept... values) { if (values!= null) { for (CodeableConcept value: values) { getType().add(value); } } return this; } public NutritionOrderOralDiet withType(Collection values) { if (values!= null) { getType().addAll(values); } return this; } public NutritionOrderOralDiet withSchedule(Timing... values) { if (values!= null) { for (Timing value: values) { getSchedule().add(value); } } return this; } public NutritionOrderOralDiet withSchedule(Collection values) { if (values!= null) { getSchedule().addAll(values); } return this; } public NutritionOrderOralDiet withNutrient(NutritionOrderNutrient... values) { if (values!= null) { for (NutritionOrderNutrient value: values) { getNutrient().add(value); } } return this; } public NutritionOrderOralDiet withNutrient(Collection values) { if (values!= null) { getNutrient().addAll(values); } return this; } public NutritionOrderOralDiet withTexture(NutritionOrderTexture... values) { if (values!= null) { for (NutritionOrderTexture value: values) { getTexture().add(value); } } return this; } public NutritionOrderOralDiet withTexture(Collection values) { if (values!= null) { getTexture().addAll(values); } return this; } public NutritionOrderOralDiet withFluidConsistencyType(CodeableConcept... values) { if (values!= null) { for (CodeableConcept value: values) { getFluidConsistencyType().add(value); } } return this; } public NutritionOrderOralDiet withFluidConsistencyType(Collection values) { if (values!= null) { getFluidConsistencyType().addAll(values); } return this; } public NutritionOrderOralDiet withInstruction(org.hl7.fhir.String value) { setInstruction(value); return this; } @Override public NutritionOrderOralDiet withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public NutritionOrderOralDiet withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public NutritionOrderOralDiet withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public NutritionOrderOralDiet withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public NutritionOrderOralDiet withId(java.lang.String value) { setId(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 NutritionOrderOralDiet that = ((NutritionOrderOralDiet) object); { List lhsType; lhsType = (((this.type!= null)&&(!this.type.isEmpty()))?this.getType():null); List rhsType; rhsType = (((that.type!= null)&&(!that.type.isEmpty()))?that.getType():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType, ((this.type!= null)&&(!this.type.isEmpty())), ((that.type!= null)&&(!that.type.isEmpty())))) { return false; } } { List lhsSchedule; lhsSchedule = (((this.schedule!= null)&&(!this.schedule.isEmpty()))?this.getSchedule():null); List rhsSchedule; rhsSchedule = (((that.schedule!= null)&&(!that.schedule.isEmpty()))?that.getSchedule():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "schedule", lhsSchedule), LocatorUtils.property(thatLocator, "schedule", rhsSchedule), lhsSchedule, rhsSchedule, ((this.schedule!= null)&&(!this.schedule.isEmpty())), ((that.schedule!= null)&&(!that.schedule.isEmpty())))) { return false; } } { List lhsNutrient; lhsNutrient = (((this.nutrient!= null)&&(!this.nutrient.isEmpty()))?this.getNutrient():null); List rhsNutrient; rhsNutrient = (((that.nutrient!= null)&&(!that.nutrient.isEmpty()))?that.getNutrient():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "nutrient", lhsNutrient), LocatorUtils.property(thatLocator, "nutrient", rhsNutrient), lhsNutrient, rhsNutrient, ((this.nutrient!= null)&&(!this.nutrient.isEmpty())), ((that.nutrient!= null)&&(!that.nutrient.isEmpty())))) { return false; } } { List lhsTexture; lhsTexture = (((this.texture!= null)&&(!this.texture.isEmpty()))?this.getTexture():null); List rhsTexture; rhsTexture = (((that.texture!= null)&&(!that.texture.isEmpty()))?that.getTexture():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "texture", lhsTexture), LocatorUtils.property(thatLocator, "texture", rhsTexture), lhsTexture, rhsTexture, ((this.texture!= null)&&(!this.texture.isEmpty())), ((that.texture!= null)&&(!that.texture.isEmpty())))) { return false; } } { List lhsFluidConsistencyType; lhsFluidConsistencyType = (((this.fluidConsistencyType!= null)&&(!this.fluidConsistencyType.isEmpty()))?this.getFluidConsistencyType():null); List rhsFluidConsistencyType; rhsFluidConsistencyType = (((that.fluidConsistencyType!= null)&&(!that.fluidConsistencyType.isEmpty()))?that.getFluidConsistencyType():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "fluidConsistencyType", lhsFluidConsistencyType), LocatorUtils.property(thatLocator, "fluidConsistencyType", rhsFluidConsistencyType), lhsFluidConsistencyType, rhsFluidConsistencyType, ((this.fluidConsistencyType!= null)&&(!this.fluidConsistencyType.isEmpty())), ((that.fluidConsistencyType!= null)&&(!that.fluidConsistencyType.isEmpty())))) { return false; } } { org.hl7.fhir.String lhsInstruction; lhsInstruction = this.getInstruction(); org.hl7.fhir.String rhsInstruction; rhsInstruction = that.getInstruction(); if (!strategy.equals(LocatorUtils.property(thisLocator, "instruction", lhsInstruction), LocatorUtils.property(thatLocator, "instruction", rhsInstruction), lhsInstruction, rhsInstruction, (this.instruction!= null), (that.instruction!= 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); { List theType; theType = (((this.type!= null)&&(!this.type.isEmpty()))?this.getType():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, ((this.type!= null)&&(!this.type.isEmpty()))); } { List theSchedule; theSchedule = (((this.schedule!= null)&&(!this.schedule.isEmpty()))?this.getSchedule():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "schedule", theSchedule), currentHashCode, theSchedule, ((this.schedule!= null)&&(!this.schedule.isEmpty()))); } { List theNutrient; theNutrient = (((this.nutrient!= null)&&(!this.nutrient.isEmpty()))?this.getNutrient():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "nutrient", theNutrient), currentHashCode, theNutrient, ((this.nutrient!= null)&&(!this.nutrient.isEmpty()))); } { List theTexture; theTexture = (((this.texture!= null)&&(!this.texture.isEmpty()))?this.getTexture():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "texture", theTexture), currentHashCode, theTexture, ((this.texture!= null)&&(!this.texture.isEmpty()))); } { List theFluidConsistencyType; theFluidConsistencyType = (((this.fluidConsistencyType!= null)&&(!this.fluidConsistencyType.isEmpty()))?this.getFluidConsistencyType():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "fluidConsistencyType", theFluidConsistencyType), currentHashCode, theFluidConsistencyType, ((this.fluidConsistencyType!= null)&&(!this.fluidConsistencyType.isEmpty()))); } { org.hl7.fhir.String theInstruction; theInstruction = this.getInstruction(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "instruction", theInstruction), currentHashCode, theInstruction, (this.instruction!= 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); { List theType; theType = (((this.type!= null)&&(!this.type.isEmpty()))?this.getType():null); strategy.appendField(locator, this, "type", buffer, theType, ((this.type!= null)&&(!this.type.isEmpty()))); } { List theSchedule; theSchedule = (((this.schedule!= null)&&(!this.schedule.isEmpty()))?this.getSchedule():null); strategy.appendField(locator, this, "schedule", buffer, theSchedule, ((this.schedule!= null)&&(!this.schedule.isEmpty()))); } { List theNutrient; theNutrient = (((this.nutrient!= null)&&(!this.nutrient.isEmpty()))?this.getNutrient():null); strategy.appendField(locator, this, "nutrient", buffer, theNutrient, ((this.nutrient!= null)&&(!this.nutrient.isEmpty()))); } { List theTexture; theTexture = (((this.texture!= null)&&(!this.texture.isEmpty()))?this.getTexture():null); strategy.appendField(locator, this, "texture", buffer, theTexture, ((this.texture!= null)&&(!this.texture.isEmpty()))); } { List theFluidConsistencyType; theFluidConsistencyType = (((this.fluidConsistencyType!= null)&&(!this.fluidConsistencyType.isEmpty()))?this.getFluidConsistencyType():null); strategy.appendField(locator, this, "fluidConsistencyType", buffer, theFluidConsistencyType, ((this.fluidConsistencyType!= null)&&(!this.fluidConsistencyType.isEmpty()))); } { org.hl7.fhir.String theInstruction; theInstruction = this.getInstruction(); strategy.appendField(locator, this, "instruction", buffer, theInstruction, (this.instruction!= null)); } return buffer; } public void setType(List value) { this.type = value; } public void setSchedule(List value) { this.schedule = value; } public void setNutrient(List value) { this.nutrient = value; } public void setTexture(List value) { this.texture = value; } public void setFluidConsistencyType(List value) { this.fluidConsistencyType = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy