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

org.hl7.elm_modelinfo.r1.ConstraintInfo Maven / Gradle / Ivy

//
// 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:11 AM MDT 
//


package org.hl7.elm_modelinfo.r1;

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.XmlAttribute;
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;


/**
 * The ConstraintInfo type models the definition of a constraint which can then be associated with a class info, class info element, or other model element.
 * 
 * 

Java class for ConstraintInfo complex type. * *

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

 * <complexType name="ConstraintInfo">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="expression" type="{urn:hl7-org:elm-modelinfo:r1}ExpressionInfo" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="severity" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       <attribute name="message" type="{http://www.w3.org/2001/XMLSchema}string" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ConstraintInfo", namespace = "urn:hl7-org:elm-modelinfo:r1", propOrder = { "expression" }) public class ConstraintInfo implements Equals2, HashCode2, ToString2 { @XmlElement(namespace = "urn:hl7-org:elm-modelinfo:r1") protected List expression; @XmlAttribute(name = "name", required = true) protected String name; @XmlAttribute(name = "severity", required = true) protected String severity; @XmlAttribute(name = "description") protected String description; @XmlAttribute(name = "message") protected String message; /** * Gets the value of the expression 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 expression property. * *

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

     *    getExpression().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ExpressionInfo } * * */ public List getExpression() { if (expression == null) { expression = new ArrayList(); } return this.expression; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the severity property. * * @return * possible object is * {@link String } * */ public String getSeverity() { return severity; } /** * Sets the value of the severity property. * * @param value * allowed object is * {@link String } * */ public void setSeverity(String value) { this.severity = value; } /** * Gets the value of the description property. * * @return * possible object is * {@link String } * */ public String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link String } * */ public void setDescription(String value) { this.description = value; } /** * Gets the value of the message property. * * @return * possible object is * {@link String } * */ public String getMessage() { return message; } /** * Sets the value of the message property. * * @param value * allowed object is * {@link String } * */ public void setMessage(String value) { this.message = value; } public ConstraintInfo withExpression(ExpressionInfo... values) { if (values!= null) { for (ExpressionInfo value: values) { getExpression().add(value); } } return this; } public ConstraintInfo withExpression(Collection values) { if (values!= null) { getExpression().addAll(values); } return this; } public ConstraintInfo withName(String value) { setName(value); return this; } public ConstraintInfo withSeverity(String value) { setSeverity(value); return this; } public ConstraintInfo withDescription(String value) { setDescription(value); return this; } public ConstraintInfo withMessage(String value) { setMessage(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; } final ConstraintInfo that = ((ConstraintInfo) object); { List lhsExpression; lhsExpression = (((this.expression!= null)&&(!this.expression.isEmpty()))?this.getExpression():null); List rhsExpression; rhsExpression = (((that.expression!= null)&&(!that.expression.isEmpty()))?that.getExpression():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "expression", lhsExpression), LocatorUtils.property(thatLocator, "expression", rhsExpression), lhsExpression, rhsExpression, ((this.expression!= null)&&(!this.expression.isEmpty())), ((that.expression!= null)&&(!that.expression.isEmpty())))) { return false; } } { String lhsName; lhsName = this.getName(); String rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName, (this.name!= null), (that.name!= null))) { return false; } } { String lhsSeverity; lhsSeverity = this.getSeverity(); String rhsSeverity; rhsSeverity = that.getSeverity(); if (!strategy.equals(LocatorUtils.property(thisLocator, "severity", lhsSeverity), LocatorUtils.property(thatLocator, "severity", rhsSeverity), lhsSeverity, rhsSeverity, (this.severity!= null), (that.severity!= null))) { return false; } } { String lhsDescription; lhsDescription = this.getDescription(); String rhsDescription; rhsDescription = that.getDescription(); if (!strategy.equals(LocatorUtils.property(thisLocator, "description", lhsDescription), LocatorUtils.property(thatLocator, "description", rhsDescription), lhsDescription, rhsDescription, (this.description!= null), (that.description!= null))) { return false; } } { String lhsMessage; lhsMessage = this.getMessage(); String rhsMessage; rhsMessage = that.getMessage(); if (!strategy.equals(LocatorUtils.property(thisLocator, "message", lhsMessage), LocatorUtils.property(thatLocator, "message", rhsMessage), lhsMessage, rhsMessage, (this.message!= null), (that.message!= 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 = 1; { List theExpression; theExpression = (((this.expression!= null)&&(!this.expression.isEmpty()))?this.getExpression():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "expression", theExpression), currentHashCode, theExpression, ((this.expression!= null)&&(!this.expression.isEmpty()))); } { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName, (this.name!= null)); } { String theSeverity; theSeverity = this.getSeverity(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "severity", theSeverity), currentHashCode, theSeverity, (this.severity!= null)); } { String theDescription; theDescription = this.getDescription(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "description", theDescription), currentHashCode, theDescription, (this.description!= null)); } { String theMessage; theMessage = this.getMessage(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "message", theMessage), currentHashCode, theMessage, (this.message!= null)); } return currentHashCode; } @Override public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance(); return this.hashCode(null, strategy); } @Override public 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) { { List theExpression; theExpression = (((this.expression!= null)&&(!this.expression.isEmpty()))?this.getExpression():null); strategy.appendField(locator, this, "expression", buffer, theExpression, ((this.expression!= null)&&(!this.expression.isEmpty()))); } { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName, (this.name!= null)); } { String theSeverity; theSeverity = this.getSeverity(); strategy.appendField(locator, this, "severity", buffer, theSeverity, (this.severity!= null)); } { String theDescription; theDescription = this.getDescription(); strategy.appendField(locator, this, "description", buffer, theDescription, (this.description!= null)); } { String theMessage; theMessage = this.getMessage(); strategy.appendField(locator, this, "message", buffer, theMessage, (this.message!= null)); } return buffer; } public void setExpression(List value) { this.expression = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy