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

org.hl7.elm.r1.DateTime Maven / Gradle / Ivy

Go to download

The elm 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 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.4.0-b180830.0438 
// See https://javaee.github.io/jaxb-v2/ 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2023.08.24 at 01:22:35 PM MDT 
//


package org.hl7.elm.r1;

import java.util.Collection;
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 javax.xml.namespace.QName;
import org.hl7.cql_annotations.r1.CqlToElmBase;
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 DateTime operator constructs a DateTime value from the given components.
 * 
 * At least one component other than timezoneOffset must be specified, and no component may be specified at a precision below an unspecified precision. For example, hour may be null, but if it is, minute, second, and millisecond must all be null as well.
 * 
 * Although the milliseconds are specified with a separate component, seconds and milliseconds are combined and represented as a Decimal for the purposes of comparison.
 * 
 * If timezoneOffset is not specified, it is defaulted to the timezone offset of the evaluation request.
 * 
 * 

Java class for DateTime complex type. * *

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

 * <complexType name="DateTime">
 *   <complexContent>
 *     <extension base="{urn:hl7-org:elm:r1}OperatorExpression">
 *       <sequence>
 *         <element name="year" type="{urn:hl7-org:elm:r1}Expression"/>
 *         <element name="month" type="{urn:hl7-org:elm:r1}Expression" minOccurs="0"/>
 *         <element name="day" type="{urn:hl7-org:elm:r1}Expression" minOccurs="0"/>
 *         <element name="hour" type="{urn:hl7-org:elm:r1}Expression" minOccurs="0"/>
 *         <element name="minute" type="{urn:hl7-org:elm:r1}Expression" minOccurs="0"/>
 *         <element name="second" type="{urn:hl7-org:elm:r1}Expression" minOccurs="0"/>
 *         <element name="millisecond" type="{urn:hl7-org:elm:r1}Expression" minOccurs="0"/>
 *         <element name="timezoneOffset" type="{urn:hl7-org:elm:r1}Expression" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DateTime", namespace = "urn:hl7-org:elm:r1", propOrder = { "year", "month", "day", "hour", "minute", "second", "millisecond", "timezoneOffset" }) public class DateTime extends OperatorExpression implements Equals2, HashCode2, ToString2 { @XmlElement(namespace = "urn:hl7-org:elm:r1", required = true) protected Expression year; @XmlElement(namespace = "urn:hl7-org:elm:r1") protected Expression month; @XmlElement(namespace = "urn:hl7-org:elm:r1") protected Expression day; @XmlElement(namespace = "urn:hl7-org:elm:r1") protected Expression hour; @XmlElement(namespace = "urn:hl7-org:elm:r1") protected Expression minute; @XmlElement(namespace = "urn:hl7-org:elm:r1") protected Expression second; @XmlElement(namespace = "urn:hl7-org:elm:r1") protected Expression millisecond; @XmlElement(namespace = "urn:hl7-org:elm:r1") protected Expression timezoneOffset; /** * Gets the value of the year property. * * @return * possible object is * {@link Expression } * */ public Expression getYear() { return year; } /** * Sets the value of the year property. * * @param value * allowed object is * {@link Expression } * */ public void setYear(Expression value) { this.year = value; } /** * Gets the value of the month property. * * @return * possible object is * {@link Expression } * */ public Expression getMonth() { return month; } /** * Sets the value of the month property. * * @param value * allowed object is * {@link Expression } * */ public void setMonth(Expression value) { this.month = value; } /** * Gets the value of the day property. * * @return * possible object is * {@link Expression } * */ public Expression getDay() { return day; } /** * Sets the value of the day property. * * @param value * allowed object is * {@link Expression } * */ public void setDay(Expression value) { this.day = value; } /** * Gets the value of the hour property. * * @return * possible object is * {@link Expression } * */ public Expression getHour() { return hour; } /** * Sets the value of the hour property. * * @param value * allowed object is * {@link Expression } * */ public void setHour(Expression value) { this.hour = value; } /** * Gets the value of the minute property. * * @return * possible object is * {@link Expression } * */ public Expression getMinute() { return minute; } /** * Sets the value of the minute property. * * @param value * allowed object is * {@link Expression } * */ public void setMinute(Expression value) { this.minute = value; } /** * Gets the value of the second property. * * @return * possible object is * {@link Expression } * */ public Expression getSecond() { return second; } /** * Sets the value of the second property. * * @param value * allowed object is * {@link Expression } * */ public void setSecond(Expression value) { this.second = value; } /** * Gets the value of the millisecond property. * * @return * possible object is * {@link Expression } * */ public Expression getMillisecond() { return millisecond; } /** * Sets the value of the millisecond property. * * @param value * allowed object is * {@link Expression } * */ public void setMillisecond(Expression value) { this.millisecond = value; } /** * Gets the value of the timezoneOffset property. * * @return * possible object is * {@link Expression } * */ public Expression getTimezoneOffset() { return timezoneOffset; } /** * Sets the value of the timezoneOffset property. * * @param value * allowed object is * {@link Expression } * */ public void setTimezoneOffset(Expression value) { this.timezoneOffset = value; } public DateTime withYear(Expression value) { setYear(value); return this; } public DateTime withMonth(Expression value) { setMonth(value); return this; } public DateTime withDay(Expression value) { setDay(value); return this; } public DateTime withHour(Expression value) { setHour(value); return this; } public DateTime withMinute(Expression value) { setMinute(value); return this; } public DateTime withSecond(Expression value) { setSecond(value); return this; } public DateTime withMillisecond(Expression value) { setMillisecond(value); return this; } public DateTime withTimezoneOffset(Expression value) { setTimezoneOffset(value); return this; } @Override public DateTime withSignature(TypeSpecifier... values) { if (values!= null) { for (TypeSpecifier value: values) { getSignature().add(value); } } return this; } @Override public DateTime withSignature(Collection values) { if (values!= null) { getSignature().addAll(values); } return this; } @Override public DateTime withAnnotation(CqlToElmBase... values) { if (values!= null) { for (CqlToElmBase value: values) { getAnnotation().add(value); } } return this; } @Override public DateTime withAnnotation(Collection values) { if (values!= null) { getAnnotation().addAll(values); } return this; } @Override public DateTime withResultTypeSpecifier(TypeSpecifier value) { setResultTypeSpecifier(value); return this; } @Override public DateTime withLocalId(String value) { setLocalId(value); return this; } @Override public DateTime withLocator(String value) { setLocator(value); return this; } @Override public DateTime withResultTypeName(QName value) { setResultTypeName(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 DateTime that = ((DateTime) object); { Expression lhsYear; lhsYear = this.getYear(); Expression rhsYear; rhsYear = that.getYear(); if (!strategy.equals(LocatorUtils.property(thisLocator, "year", lhsYear), LocatorUtils.property(thatLocator, "year", rhsYear), lhsYear, rhsYear, (this.year!= null), (that.year!= null))) { return false; } } { Expression lhsMonth; lhsMonth = this.getMonth(); Expression rhsMonth; rhsMonth = that.getMonth(); if (!strategy.equals(LocatorUtils.property(thisLocator, "month", lhsMonth), LocatorUtils.property(thatLocator, "month", rhsMonth), lhsMonth, rhsMonth, (this.month!= null), (that.month!= null))) { return false; } } { Expression lhsDay; lhsDay = this.getDay(); Expression rhsDay; rhsDay = that.getDay(); if (!strategy.equals(LocatorUtils.property(thisLocator, "day", lhsDay), LocatorUtils.property(thatLocator, "day", rhsDay), lhsDay, rhsDay, (this.day!= null), (that.day!= null))) { return false; } } { Expression lhsHour; lhsHour = this.getHour(); Expression rhsHour; rhsHour = that.getHour(); if (!strategy.equals(LocatorUtils.property(thisLocator, "hour", lhsHour), LocatorUtils.property(thatLocator, "hour", rhsHour), lhsHour, rhsHour, (this.hour!= null), (that.hour!= null))) { return false; } } { Expression lhsMinute; lhsMinute = this.getMinute(); Expression rhsMinute; rhsMinute = that.getMinute(); if (!strategy.equals(LocatorUtils.property(thisLocator, "minute", lhsMinute), LocatorUtils.property(thatLocator, "minute", rhsMinute), lhsMinute, rhsMinute, (this.minute!= null), (that.minute!= null))) { return false; } } { Expression lhsSecond; lhsSecond = this.getSecond(); Expression rhsSecond; rhsSecond = that.getSecond(); if (!strategy.equals(LocatorUtils.property(thisLocator, "second", lhsSecond), LocatorUtils.property(thatLocator, "second", rhsSecond), lhsSecond, rhsSecond, (this.second!= null), (that.second!= null))) { return false; } } { Expression lhsMillisecond; lhsMillisecond = this.getMillisecond(); Expression rhsMillisecond; rhsMillisecond = that.getMillisecond(); if (!strategy.equals(LocatorUtils.property(thisLocator, "millisecond", lhsMillisecond), LocatorUtils.property(thatLocator, "millisecond", rhsMillisecond), lhsMillisecond, rhsMillisecond, (this.millisecond!= null), (that.millisecond!= null))) { return false; } } { Expression lhsTimezoneOffset; lhsTimezoneOffset = this.getTimezoneOffset(); Expression rhsTimezoneOffset; rhsTimezoneOffset = that.getTimezoneOffset(); if (!strategy.equals(LocatorUtils.property(thisLocator, "timezoneOffset", lhsTimezoneOffset), LocatorUtils.property(thatLocator, "timezoneOffset", rhsTimezoneOffset), lhsTimezoneOffset, rhsTimezoneOffset, (this.timezoneOffset!= null), (that.timezoneOffset!= 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); { Expression theYear; theYear = this.getYear(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "year", theYear), currentHashCode, theYear, (this.year!= null)); } { Expression theMonth; theMonth = this.getMonth(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "month", theMonth), currentHashCode, theMonth, (this.month!= null)); } { Expression theDay; theDay = this.getDay(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "day", theDay), currentHashCode, theDay, (this.day!= null)); } { Expression theHour; theHour = this.getHour(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "hour", theHour), currentHashCode, theHour, (this.hour!= null)); } { Expression theMinute; theMinute = this.getMinute(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "minute", theMinute), currentHashCode, theMinute, (this.minute!= null)); } { Expression theSecond; theSecond = this.getSecond(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "second", theSecond), currentHashCode, theSecond, (this.second!= null)); } { Expression theMillisecond; theMillisecond = this.getMillisecond(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "millisecond", theMillisecond), currentHashCode, theMillisecond, (this.millisecond!= null)); } { Expression theTimezoneOffset; theTimezoneOffset = this.getTimezoneOffset(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "timezoneOffset", theTimezoneOffset), currentHashCode, theTimezoneOffset, (this.timezoneOffset!= 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) { super.appendFields(locator, buffer, strategy); { Expression theYear; theYear = this.getYear(); strategy.appendField(locator, this, "year", buffer, theYear, (this.year!= null)); } { Expression theMonth; theMonth = this.getMonth(); strategy.appendField(locator, this, "month", buffer, theMonth, (this.month!= null)); } { Expression theDay; theDay = this.getDay(); strategy.appendField(locator, this, "day", buffer, theDay, (this.day!= null)); } { Expression theHour; theHour = this.getHour(); strategy.appendField(locator, this, "hour", buffer, theHour, (this.hour!= null)); } { Expression theMinute; theMinute = this.getMinute(); strategy.appendField(locator, this, "minute", buffer, theMinute, (this.minute!= null)); } { Expression theSecond; theSecond = this.getSecond(); strategy.appendField(locator, this, "second", buffer, theSecond, (this.second!= null)); } { Expression theMillisecond; theMillisecond = this.getMillisecond(); strategy.appendField(locator, this, "millisecond", buffer, theMillisecond, (this.millisecond!= null)); } { Expression theTimezoneOffset; theTimezoneOffset = this.getTimezoneOffset(); strategy.appendField(locator, this, "timezoneOffset", buffer, theTimezoneOffset, (this.timezoneOffset!= null)); } return buffer; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy