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

org.hl7.fhir.AuditEvent 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 AuditEvent complex type. * *

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

 * <complexType name="AuditEvent">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="type" type="{http://hl7.org/fhir}Coding"/>
 *         <element name="subtype" type="{http://hl7.org/fhir}Coding" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="action" type="{http://hl7.org/fhir}AuditEventAction" minOccurs="0"/>
 *         <element name="recorded" type="{http://hl7.org/fhir}instant"/>
 *         <element name="outcome" type="{http://hl7.org/fhir}AuditEventOutcome" minOccurs="0"/>
 *         <element name="outcomeDesc" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="purposeOfEvent" type="{http://hl7.org/fhir}Coding" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="agent" type="{http://hl7.org/fhir}AuditEvent.Agent" maxOccurs="unbounded"/>
 *         <element name="source" type="{http://hl7.org/fhir}AuditEvent.Source"/>
 *         <element name="entity" type="{http://hl7.org/fhir}AuditEvent.Entity" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AuditEvent", propOrder = { "type", "subtype", "action", "recorded", "outcome", "outcomeDesc", "purposeOfEvent", "agent", "source", "entity" }) public class AuditEvent extends DomainResource implements Equals2, HashCode2, ToString2 { @XmlElement(required = true) protected Coding type; protected List subtype; protected AuditEventAction action; @XmlElement(required = true) protected Instant recorded; protected AuditEventOutcome outcome; protected org.hl7.fhir.String outcomeDesc; protected List purposeOfEvent; @XmlElement(required = true) protected List agent; @XmlElement(required = true) protected AuditEventSource source; protected List entity; /** * Gets the value of the type property. * * @return * possible object is * {@link Coding } * */ public Coding getType() { return type; } /** * Sets the value of the type property. * * @param value * allowed object is * {@link Coding } * */ public void setType(Coding value) { this.type = value; } /** * Gets the value of the subtype 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 subtype property. * *

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

     *    getSubtype().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Coding } * * */ public List getSubtype() { if (subtype == null) { subtype = new ArrayList(); } return this.subtype; } /** * Gets the value of the action property. * * @return * possible object is * {@link AuditEventAction } * */ public AuditEventAction getAction() { return action; } /** * Sets the value of the action property. * * @param value * allowed object is * {@link AuditEventAction } * */ public void setAction(AuditEventAction value) { this.action = value; } /** * Gets the value of the recorded property. * * @return * possible object is * {@link Instant } * */ public Instant getRecorded() { return recorded; } /** * Sets the value of the recorded property. * * @param value * allowed object is * {@link Instant } * */ public void setRecorded(Instant value) { this.recorded = value; } /** * Gets the value of the outcome property. * * @return * possible object is * {@link AuditEventOutcome } * */ public AuditEventOutcome getOutcome() { return outcome; } /** * Sets the value of the outcome property. * * @param value * allowed object is * {@link AuditEventOutcome } * */ public void setOutcome(AuditEventOutcome value) { this.outcome = value; } /** * Gets the value of the outcomeDesc property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getOutcomeDesc() { return outcomeDesc; } /** * Sets the value of the outcomeDesc property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setOutcomeDesc(org.hl7.fhir.String value) { this.outcomeDesc = value; } /** * Gets the value of the purposeOfEvent 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 purposeOfEvent property. * *

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

     *    getPurposeOfEvent().add(newItem);
     * 
* * *

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

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

     *    getAgent().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link AuditEventAgent } * * */ public List getAgent() { if (agent == null) { agent = new ArrayList(); } return this.agent; } /** * Gets the value of the source property. * * @return * possible object is * {@link AuditEventSource } * */ public AuditEventSource getSource() { return source; } /** * Sets the value of the source property. * * @param value * allowed object is * {@link AuditEventSource } * */ public void setSource(AuditEventSource value) { this.source = value; } /** * Gets the value of the entity 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 entity property. * *

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

     *    getEntity().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link AuditEventEntity } * * */ public List getEntity() { if (entity == null) { entity = new ArrayList(); } return this.entity; } public AuditEvent withType(Coding value) { setType(value); return this; } public AuditEvent withSubtype(Coding... values) { if (values!= null) { for (Coding value: values) { getSubtype().add(value); } } return this; } public AuditEvent withSubtype(Collection values) { if (values!= null) { getSubtype().addAll(values); } return this; } public AuditEvent withAction(AuditEventAction value) { setAction(value); return this; } public AuditEvent withRecorded(Instant value) { setRecorded(value); return this; } public AuditEvent withOutcome(AuditEventOutcome value) { setOutcome(value); return this; } public AuditEvent withOutcomeDesc(org.hl7.fhir.String value) { setOutcomeDesc(value); return this; } public AuditEvent withPurposeOfEvent(Coding... values) { if (values!= null) { for (Coding value: values) { getPurposeOfEvent().add(value); } } return this; } public AuditEvent withPurposeOfEvent(Collection values) { if (values!= null) { getPurposeOfEvent().addAll(values); } return this; } public AuditEvent withAgent(AuditEventAgent... values) { if (values!= null) { for (AuditEventAgent value: values) { getAgent().add(value); } } return this; } public AuditEvent withAgent(Collection values) { if (values!= null) { getAgent().addAll(values); } return this; } public AuditEvent withSource(AuditEventSource value) { setSource(value); return this; } public AuditEvent withEntity(AuditEventEntity... values) { if (values!= null) { for (AuditEventEntity value: values) { getEntity().add(value); } } return this; } public AuditEvent withEntity(Collection values) { if (values!= null) { getEntity().addAll(values); } return this; } @Override public AuditEvent withText(Narrative value) { setText(value); return this; } @Override public AuditEvent withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public AuditEvent withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public AuditEvent withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public AuditEvent withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public AuditEvent withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public AuditEvent withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public AuditEvent withId(Id value) { setId(value); return this; } @Override public AuditEvent withMeta(Meta value) { setMeta(value); return this; } @Override public AuditEvent withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public AuditEvent 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 AuditEvent that = ((AuditEvent) object); { Coding lhsType; lhsType = this.getType(); Coding 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; } } { List lhsSubtype; lhsSubtype = (((this.subtype!= null)&&(!this.subtype.isEmpty()))?this.getSubtype():null); List rhsSubtype; rhsSubtype = (((that.subtype!= null)&&(!that.subtype.isEmpty()))?that.getSubtype():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "subtype", lhsSubtype), LocatorUtils.property(thatLocator, "subtype", rhsSubtype), lhsSubtype, rhsSubtype, ((this.subtype!= null)&&(!this.subtype.isEmpty())), ((that.subtype!= null)&&(!that.subtype.isEmpty())))) { return false; } } { AuditEventAction lhsAction; lhsAction = this.getAction(); AuditEventAction rhsAction; rhsAction = that.getAction(); if (!strategy.equals(LocatorUtils.property(thisLocator, "action", lhsAction), LocatorUtils.property(thatLocator, "action", rhsAction), lhsAction, rhsAction, (this.action!= null), (that.action!= null))) { return false; } } { Instant lhsRecorded; lhsRecorded = this.getRecorded(); Instant rhsRecorded; rhsRecorded = that.getRecorded(); if (!strategy.equals(LocatorUtils.property(thisLocator, "recorded", lhsRecorded), LocatorUtils.property(thatLocator, "recorded", rhsRecorded), lhsRecorded, rhsRecorded, (this.recorded!= null), (that.recorded!= null))) { return false; } } { AuditEventOutcome lhsOutcome; lhsOutcome = this.getOutcome(); AuditEventOutcome rhsOutcome; rhsOutcome = that.getOutcome(); if (!strategy.equals(LocatorUtils.property(thisLocator, "outcome", lhsOutcome), LocatorUtils.property(thatLocator, "outcome", rhsOutcome), lhsOutcome, rhsOutcome, (this.outcome!= null), (that.outcome!= null))) { return false; } } { org.hl7.fhir.String lhsOutcomeDesc; lhsOutcomeDesc = this.getOutcomeDesc(); org.hl7.fhir.String rhsOutcomeDesc; rhsOutcomeDesc = that.getOutcomeDesc(); if (!strategy.equals(LocatorUtils.property(thisLocator, "outcomeDesc", lhsOutcomeDesc), LocatorUtils.property(thatLocator, "outcomeDesc", rhsOutcomeDesc), lhsOutcomeDesc, rhsOutcomeDesc, (this.outcomeDesc!= null), (that.outcomeDesc!= null))) { return false; } } { List lhsPurposeOfEvent; lhsPurposeOfEvent = (((this.purposeOfEvent!= null)&&(!this.purposeOfEvent.isEmpty()))?this.getPurposeOfEvent():null); List rhsPurposeOfEvent; rhsPurposeOfEvent = (((that.purposeOfEvent!= null)&&(!that.purposeOfEvent.isEmpty()))?that.getPurposeOfEvent():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "purposeOfEvent", lhsPurposeOfEvent), LocatorUtils.property(thatLocator, "purposeOfEvent", rhsPurposeOfEvent), lhsPurposeOfEvent, rhsPurposeOfEvent, ((this.purposeOfEvent!= null)&&(!this.purposeOfEvent.isEmpty())), ((that.purposeOfEvent!= null)&&(!that.purposeOfEvent.isEmpty())))) { return false; } } { List lhsAgent; lhsAgent = (((this.agent!= null)&&(!this.agent.isEmpty()))?this.getAgent():null); List rhsAgent; rhsAgent = (((that.agent!= null)&&(!that.agent.isEmpty()))?that.getAgent():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "agent", lhsAgent), LocatorUtils.property(thatLocator, "agent", rhsAgent), lhsAgent, rhsAgent, ((this.agent!= null)&&(!this.agent.isEmpty())), ((that.agent!= null)&&(!that.agent.isEmpty())))) { return false; } } { AuditEventSource lhsSource; lhsSource = this.getSource(); AuditEventSource 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; } } { List lhsEntity; lhsEntity = (((this.entity!= null)&&(!this.entity.isEmpty()))?this.getEntity():null); List rhsEntity; rhsEntity = (((that.entity!= null)&&(!that.entity.isEmpty()))?that.getEntity():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "entity", lhsEntity), LocatorUtils.property(thatLocator, "entity", rhsEntity), lhsEntity, rhsEntity, ((this.entity!= null)&&(!this.entity.isEmpty())), ((that.entity!= null)&&(!that.entity.isEmpty())))) { 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); { Coding theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType, (this.type!= null)); } { List theSubtype; theSubtype = (((this.subtype!= null)&&(!this.subtype.isEmpty()))?this.getSubtype():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "subtype", theSubtype), currentHashCode, theSubtype, ((this.subtype!= null)&&(!this.subtype.isEmpty()))); } { AuditEventAction theAction; theAction = this.getAction(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "action", theAction), currentHashCode, theAction, (this.action!= null)); } { Instant theRecorded; theRecorded = this.getRecorded(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "recorded", theRecorded), currentHashCode, theRecorded, (this.recorded!= null)); } { AuditEventOutcome theOutcome; theOutcome = this.getOutcome(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "outcome", theOutcome), currentHashCode, theOutcome, (this.outcome!= null)); } { org.hl7.fhir.String theOutcomeDesc; theOutcomeDesc = this.getOutcomeDesc(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "outcomeDesc", theOutcomeDesc), currentHashCode, theOutcomeDesc, (this.outcomeDesc!= null)); } { List thePurposeOfEvent; thePurposeOfEvent = (((this.purposeOfEvent!= null)&&(!this.purposeOfEvent.isEmpty()))?this.getPurposeOfEvent():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "purposeOfEvent", thePurposeOfEvent), currentHashCode, thePurposeOfEvent, ((this.purposeOfEvent!= null)&&(!this.purposeOfEvent.isEmpty()))); } { List theAgent; theAgent = (((this.agent!= null)&&(!this.agent.isEmpty()))?this.getAgent():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "agent", theAgent), currentHashCode, theAgent, ((this.agent!= null)&&(!this.agent.isEmpty()))); } { AuditEventSource theSource; theSource = this.getSource(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "source", theSource), currentHashCode, theSource, (this.source!= null)); } { List theEntity; theEntity = (((this.entity!= null)&&(!this.entity.isEmpty()))?this.getEntity():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "entity", theEntity), currentHashCode, theEntity, ((this.entity!= null)&&(!this.entity.isEmpty()))); } 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); { Coding theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType, (this.type!= null)); } { List theSubtype; theSubtype = (((this.subtype!= null)&&(!this.subtype.isEmpty()))?this.getSubtype():null); strategy.appendField(locator, this, "subtype", buffer, theSubtype, ((this.subtype!= null)&&(!this.subtype.isEmpty()))); } { AuditEventAction theAction; theAction = this.getAction(); strategy.appendField(locator, this, "action", buffer, theAction, (this.action!= null)); } { Instant theRecorded; theRecorded = this.getRecorded(); strategy.appendField(locator, this, "recorded", buffer, theRecorded, (this.recorded!= null)); } { AuditEventOutcome theOutcome; theOutcome = this.getOutcome(); strategy.appendField(locator, this, "outcome", buffer, theOutcome, (this.outcome!= null)); } { org.hl7.fhir.String theOutcomeDesc; theOutcomeDesc = this.getOutcomeDesc(); strategy.appendField(locator, this, "outcomeDesc", buffer, theOutcomeDesc, (this.outcomeDesc!= null)); } { List thePurposeOfEvent; thePurposeOfEvent = (((this.purposeOfEvent!= null)&&(!this.purposeOfEvent.isEmpty()))?this.getPurposeOfEvent():null); strategy.appendField(locator, this, "purposeOfEvent", buffer, thePurposeOfEvent, ((this.purposeOfEvent!= null)&&(!this.purposeOfEvent.isEmpty()))); } { List theAgent; theAgent = (((this.agent!= null)&&(!this.agent.isEmpty()))?this.getAgent():null); strategy.appendField(locator, this, "agent", buffer, theAgent, ((this.agent!= null)&&(!this.agent.isEmpty()))); } { AuditEventSource theSource; theSource = this.getSource(); strategy.appendField(locator, this, "source", buffer, theSource, (this.source!= null)); } { List theEntity; theEntity = (((this.entity!= null)&&(!this.entity.isEmpty()))?this.getEntity():null); strategy.appendField(locator, this, "entity", buffer, theEntity, ((this.entity!= null)&&(!this.entity.isEmpty()))); } return buffer; } public void setSubtype(List value) { this.subtype = value; } public void setPurposeOfEvent(List value) { this.purposeOfEvent = value; } public void setAgent(List value) { this.agent = value; } public void setEntity(List value) { this.entity = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy