
org.somda.sdc.biceps.model.participant.PatientContextState Maven / Gradle / Ivy
package org.somda.sdc.biceps.model.participant;
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.jetbrains.annotations.Nullable;
import org.jvnet.jaxb.lang.CopyStrategy;
import org.jvnet.jaxb.lang.CopyTo;
import org.jvnet.jaxb.lang.JAXBCopyStrategy;
import org.jvnet.jaxb.lang.JAXBToStringStrategy;
import org.jvnet.jaxb.lang.ToString;
import org.jvnet.jaxb.lang.ToStringStrategy;
import org.jvnet.jaxb.locator.ObjectLocator;
import org.jvnet.jaxb.locator.util.LocatorUtils;
/**
* Observed information about a patient, e.g., demographics.
*
* NOTE—PatientContextState contains information that is typical for a header in an anamnesis questionnaire.
*
* Java class for PatientContextState complex type
.
*
* The following schema fragment specifies the expected content contained within this class.
*
* {@code
*
*
*
*
*
*
*
*
*
* }
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PatientContextState", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant", propOrder = {
"coreData"
})
public class PatientContextState
extends AbstractContextState
implements Cloneable, CopyTo, ToString
{
@XmlElement(name = "CoreData", namespace = "http://standards.ieee.org/downloads/11073/11073-10207-2017/participant")
protected PatientDemographicsCoreData coreData;
/**
* Gets the value of the coreData property.
*
* @return
* possible object is
* {@link PatientDemographicsCoreData }
*
*/
@Nullable
public PatientDemographicsCoreData getCoreData() {
return coreData;
}
/**
* Sets the value of the coreData property.
*
* @param value
* allowed object is
* {@link PatientDemographicsCoreData }
*
*/
public void setCoreData(
@Nullable
PatientDemographicsCoreData value) {
this.coreData = value;
}
@Override
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(object)) {
return false;
}
final PatientContextState that = ((PatientContextState) object);
{
PatientDemographicsCoreData leftCoreData;
leftCoreData = this.getCoreData();
PatientDemographicsCoreData rightCoreData;
rightCoreData = that.getCoreData();
if (this.coreData!= null) {
if (that.coreData!= null) {
if (!leftCoreData.equals(rightCoreData)) {
return false;
}
} else {
return false;
}
} else {
if (that.coreData!= null) {
return false;
}
}
}
return true;
}
@Override
public int hashCode() {
int currentHashCode = 1;
currentHashCode = ((currentHashCode* 31)+ super.hashCode());
{
currentHashCode = (currentHashCode* 31);
PatientDemographicsCoreData theCoreData;
theCoreData = this.getCoreData();
if (this.coreData!= null) {
currentHashCode += theCoreData.hashCode();
}
}
return currentHashCode;
}
@Override
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.getInstance();
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
@Override
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;
}
@Override
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
super.appendFields(locator, buffer, strategy);
{
PatientDemographicsCoreData theCoreData;
theCoreData = this.getCoreData();
strategy.appendField(locator, this, "coreData", buffer, theCoreData, (this.coreData!= null));
}
return buffer;
}
@Override
public Object clone() {
return copyTo(createNewInstance());
}
@Override
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.getInstance();
return copyTo(null, target, strategy);
}
@Override
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
super.copyTo(locator, draftCopy, strategy);
if (draftCopy instanceof PatientContextState) {
final PatientContextState copy = ((PatientContextState) draftCopy);
{
Boolean coreDataShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.coreData!= null));
if (coreDataShouldBeCopiedAndSet == Boolean.TRUE) {
PatientDemographicsCoreData sourceCoreData;
sourceCoreData = this.getCoreData();
PatientDemographicsCoreData copyCoreData = ((PatientDemographicsCoreData) strategy.copy(LocatorUtils.property(locator, "coreData", sourceCoreData), sourceCoreData, (this.coreData!= null)));
copy.setCoreData(copyCoreData);
} else {
if (coreDataShouldBeCopiedAndSet == Boolean.FALSE) {
copy.coreData = null;
}
}
}
}
return draftCopy;
}
@Override
public Object createNewInstance() {
return new PatientContextState();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy