
org.hl7.fhir.Group 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.XmlElement;
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 Group complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Group">
* <complexContent>
* <extension base="{http://hl7.org/fhir}DomainResource">
* <sequence>
* <element name="identifier" type="{http://hl7.org/fhir}Identifier" maxOccurs="unbounded" minOccurs="0"/>
* <element name="type" type="{http://hl7.org/fhir}GroupType"/>
* <element name="actual" type="{http://hl7.org/fhir}boolean"/>
* <element name="active" type="{http://hl7.org/fhir}boolean" minOccurs="0"/>
* <element name="code" type="{http://hl7.org/fhir}CodeableConcept" minOccurs="0"/>
* <element name="name" type="{http://hl7.org/fhir}string" minOccurs="0"/>
* <element name="quantity" type="{http://hl7.org/fhir}unsignedInt" minOccurs="0"/>
* <element name="characteristic" type="{http://hl7.org/fhir}Group.Characteristic" maxOccurs="unbounded" minOccurs="0"/>
* <element name="member" type="{http://hl7.org/fhir}Group.Member" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Group", propOrder = {
"identifier",
"type",
"actual",
"active",
"code",
"name",
"quantity",
"characteristic",
"member"
})
public class Group
extends DomainResource
implements Equals, HashCode, ToString
{
protected List identifier;
@XmlElement(required = true)
protected GroupType type;
@XmlElement(required = true)
protected Boolean actual;
protected Boolean active;
protected CodeableConcept code;
protected org.hl7.fhir.String name;
protected UnsignedInt quantity;
protected List characteristic;
protected List member;
/**
* 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 JAXB 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 type property.
*
* @return
* possible object is
* {@link GroupType }
*
*/
public GroupType getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link GroupType }
*
*/
public void setType(GroupType value) {
this.type = value;
}
/**
* Gets the value of the actual property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean getActual() {
return actual;
}
/**
* Sets the value of the actual property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setActual(Boolean value) {
this.actual = value;
}
/**
* Gets the value of the active property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean getActive() {
return active;
}
/**
* Sets the value of the active property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setActive(Boolean value) {
this.active = 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 name property.
*
* @return
* possible object is
* {@link org.hl7.fhir.String }
*
*/
public org.hl7.fhir.String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link org.hl7.fhir.String }
*
*/
public void setName(org.hl7.fhir.String value) {
this.name = value;
}
/**
* Gets the value of the quantity property.
*
* @return
* possible object is
* {@link UnsignedInt }
*
*/
public UnsignedInt getQuantity() {
return quantity;
}
/**
* Sets the value of the quantity property.
*
* @param value
* allowed object is
* {@link UnsignedInt }
*
*/
public void setQuantity(UnsignedInt value) {
this.quantity = value;
}
/**
* Gets the value of the characteristic 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 characteristic property.
*
*
* For example, to add a new item, do as follows:
*
* getCharacteristic().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link GroupCharacteristic }
*
*
*/
public List getCharacteristic() {
if (characteristic == null) {
characteristic = new ArrayList();
}
return this.characteristic;
}
/**
* Gets the value of the member 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 member property.
*
*
* For example, to add a new item, do as follows:
*
* getMember().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link GroupMember }
*
*
*/
public List getMember() {
if (member == null) {
member = new ArrayList();
}
return this.member;
}
public Group withIdentifier(Identifier... values) {
if (values!= null) {
for (Identifier value: values) {
getIdentifier().add(value);
}
}
return this;
}
public Group withIdentifier(Collection values) {
if (values!= null) {
getIdentifier().addAll(values);
}
return this;
}
public Group withType(GroupType value) {
setType(value);
return this;
}
public Group withActual(Boolean value) {
setActual(value);
return this;
}
public Group withActive(Boolean value) {
setActive(value);
return this;
}
public Group withCode(CodeableConcept value) {
setCode(value);
return this;
}
public Group withName(org.hl7.fhir.String value) {
setName(value);
return this;
}
public Group withQuantity(UnsignedInt value) {
setQuantity(value);
return this;
}
public Group withCharacteristic(GroupCharacteristic... values) {
if (values!= null) {
for (GroupCharacteristic value: values) {
getCharacteristic().add(value);
}
}
return this;
}
public Group withCharacteristic(Collection values) {
if (values!= null) {
getCharacteristic().addAll(values);
}
return this;
}
public Group withMember(GroupMember... values) {
if (values!= null) {
for (GroupMember value: values) {
getMember().add(value);
}
}
return this;
}
public Group withMember(Collection values) {
if (values!= null) {
getMember().addAll(values);
}
return this;
}
@Override
public Group withText(Narrative value) {
setText(value);
return this;
}
@Override
public Group withContained(ResourceContainer... values) {
if (values!= null) {
for (ResourceContainer value: values) {
getContained().add(value);
}
}
return this;
}
@Override
public Group withContained(Collection values) {
if (values!= null) {
getContained().addAll(values);
}
return this;
}
@Override
public Group withExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getExtension().add(value);
}
}
return this;
}
@Override
public Group withExtension(Collection values) {
if (values!= null) {
getExtension().addAll(values);
}
return this;
}
@Override
public Group withModifierExtension(Extension... values) {
if (values!= null) {
for (Extension value: values) {
getModifierExtension().add(value);
}
}
return this;
}
@Override
public Group withModifierExtension(Collection values) {
if (values!= null) {
getModifierExtension().addAll(values);
}
return this;
}
@Override
public Group withId(Id value) {
setId(value);
return this;
}
@Override
public Group withMeta(Meta value) {
setMeta(value);
return this;
}
@Override
public Group withImplicitRules(Uri value) {
setImplicitRules(value);
return this;
}
@Override
public Group withLanguage(Code value) {
setLanguage(value);
return this;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof Group)) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
final Group that = ((Group) 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)) {
return false;
}
}
{
GroupType lhsType;
lhsType = this.getType();
GroupType rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) {
return false;
}
}
{
Boolean lhsActual;
lhsActual = this.getActual();
Boolean rhsActual;
rhsActual = that.getActual();
if (!strategy.equals(LocatorUtils.property(thisLocator, "actual", lhsActual), LocatorUtils.property(thatLocator, "actual", rhsActual), lhsActual, rhsActual)) {
return false;
}
}
{
Boolean lhsActive;
lhsActive = this.getActive();
Boolean rhsActive;
rhsActive = that.getActive();
if (!strategy.equals(LocatorUtils.property(thisLocator, "active", lhsActive), LocatorUtils.property(thatLocator, "active", rhsActive), lhsActive, rhsActive)) {
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)) {
return false;
}
}
{
org.hl7.fhir.String lhsName;
lhsName = this.getName();
org.hl7.fhir.String rhsName;
rhsName = that.getName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName)) {
return false;
}
}
{
UnsignedInt lhsQuantity;
lhsQuantity = this.getQuantity();
UnsignedInt rhsQuantity;
rhsQuantity = that.getQuantity();
if (!strategy.equals(LocatorUtils.property(thisLocator, "quantity", lhsQuantity), LocatorUtils.property(thatLocator, "quantity", rhsQuantity), lhsQuantity, rhsQuantity)) {
return false;
}
}
{
List lhsCharacteristic;
lhsCharacteristic = (((this.characteristic!= null)&&(!this.characteristic.isEmpty()))?this.getCharacteristic():null);
List rhsCharacteristic;
rhsCharacteristic = (((that.characteristic!= null)&&(!that.characteristic.isEmpty()))?that.getCharacteristic():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "characteristic", lhsCharacteristic), LocatorUtils.property(thatLocator, "characteristic", rhsCharacteristic), lhsCharacteristic, rhsCharacteristic)) {
return false;
}
}
{
List lhsMember;
lhsMember = (((this.member!= null)&&(!this.member.isEmpty()))?this.getMember():null);
List rhsMember;
rhsMember = (((that.member!= null)&&(!that.member.isEmpty()))?that.getMember():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "member", lhsMember), LocatorUtils.property(thatLocator, "member", rhsMember), lhsMember, rhsMember)) {
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);
{
List theIdentifier;
theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "identifier", theIdentifier), currentHashCode, theIdentifier);
}
{
GroupType theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType);
}
{
Boolean theActual;
theActual = this.getActual();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "actual", theActual), currentHashCode, theActual);
}
{
Boolean theActive;
theActive = this.getActive();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "active", theActive), currentHashCode, theActive);
}
{
CodeableConcept theCode;
theCode = this.getCode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode);
}
{
org.hl7.fhir.String theName;
theName = this.getName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName);
}
{
UnsignedInt theQuantity;
theQuantity = this.getQuantity();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "quantity", theQuantity), currentHashCode, theQuantity);
}
{
List theCharacteristic;
theCharacteristic = (((this.characteristic!= null)&&(!this.characteristic.isEmpty()))?this.getCharacteristic():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "characteristic", theCharacteristic), currentHashCode, theCharacteristic);
}
{
List theMember;
theMember = (((this.member!= null)&&(!this.member.isEmpty()))?this.getMember():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "member", theMember), currentHashCode, theMember);
}
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);
{
List theIdentifier;
theIdentifier = (((this.identifier!= null)&&(!this.identifier.isEmpty()))?this.getIdentifier():null);
strategy.appendField(locator, this, "identifier", buffer, theIdentifier);
}
{
GroupType theType;
theType = this.getType();
strategy.appendField(locator, this, "type", buffer, theType);
}
{
Boolean theActual;
theActual = this.getActual();
strategy.appendField(locator, this, "actual", buffer, theActual);
}
{
Boolean theActive;
theActive = this.getActive();
strategy.appendField(locator, this, "active", buffer, theActive);
}
{
CodeableConcept theCode;
theCode = this.getCode();
strategy.appendField(locator, this, "code", buffer, theCode);
}
{
org.hl7.fhir.String theName;
theName = this.getName();
strategy.appendField(locator, this, "name", buffer, theName);
}
{
UnsignedInt theQuantity;
theQuantity = this.getQuantity();
strategy.appendField(locator, this, "quantity", buffer, theQuantity);
}
{
List theCharacteristic;
theCharacteristic = (((this.characteristic!= null)&&(!this.characteristic.isEmpty()))?this.getCharacteristic():null);
strategy.appendField(locator, this, "characteristic", buffer, theCharacteristic);
}
{
List theMember;
theMember = (((this.member!= null)&&(!this.member.isEmpty()))?this.getMember():null);
strategy.appendField(locator, this, "member", buffer, theMember);
}
return buffer;
}
}