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

nz.co.senanque.workflow.nmcinstances.Session Maven / Gradle / Ivy

The newest version!
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2018.04.23 at 11:20:27 PM UTC 
//


package nz.co.senanque.workflow.nmcinstances;

import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
import nz.co.senanque.validationengine.ObjectMetadata;
import nz.co.senanque.validationengine.ValidationObject;
import nz.co.senanque.validationengine.ValidationSession;
import nz.co.senanque.validationengine.ValidationUtils;
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;


/**
 * 

Java class for Session complex type. * *

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

 * <complexType name="Session">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="user" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         <element name="started" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Session", propOrder = { "user", "started" }) @XmlRootElement(name = "Session") public class Session implements ValidationObject, Equals, HashCode, ToString { @XmlElement(required = true) protected String user; @XmlElement(required = true) @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar started; @XmlTransient protected ValidationSession m_validationSession; @XmlTransient protected ObjectMetadata m_metadata; @XmlTransient public final static String USER = "user"; @XmlTransient public final static String STARTED = "started"; public Session() { ValidationUtils.setDefaults(this); } /** * Gets the value of the user property. * * @return * possible object is * {@link String } * */ public String getUser() { if (m_validationSession!= null) { m_validationSession.clean(this); } return user; } /** * Sets the value of the user property. * * @param value * allowed object is * {@link String } * */ public void setUser(String value) { getMetadata().removeUnknown("user"); if (m_validationSession!= null) { m_validationSession.set(this, "user", value, user); } this.user = value; if (m_validationSession!= null) { m_validationSession.invokeListeners(this, "user", value, user); } } /** * Gets the value of the started property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getStarted() { if (m_validationSession!= null) { m_validationSession.clean(this); } return started; } /** * Sets the value of the started property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setStarted(XMLGregorianCalendar value) { getMetadata().removeUnknown("started"); if (m_validationSession!= null) { m_validationSession.set(this, "started", value, started); } this.started = value; if (m_validationSession!= null) { m_validationSession.invokeListeners(this, "started", value, started); } } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Session)) { return false; } if (this == object) { return true; } final Session that = ((Session) object); { String lhsUser; lhsUser = this.getUser(); String rhsUser; rhsUser = that.getUser(); if (!strategy.equals(LocatorUtils.property(thisLocator, "user", lhsUser), LocatorUtils.property(thatLocator, "user", rhsUser), lhsUser, rhsUser)) { return false; } } { XMLGregorianCalendar lhsStarted; lhsStarted = this.getStarted(); XMLGregorianCalendar rhsStarted; rhsStarted = that.getStarted(); if (!strategy.equals(LocatorUtils.property(thisLocator, "started", lhsStarted), LocatorUtils.property(thatLocator, "started", rhsStarted), lhsStarted, rhsStarted)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public 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) { { String theUser; theUser = this.getUser(); strategy.appendField(locator, this, "user", buffer, theUser); } { XMLGregorianCalendar theStarted; theStarted = this.getStarted(); strategy.appendField(locator, this, "started", buffer, theStarted); } return buffer; } public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theUser; theUser = this.getUser(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "user", theUser), currentHashCode, theUser); } { XMLGregorianCalendar theStarted; theStarted = this.getStarted(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "started", theStarted), currentHashCode, theStarted); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } @Transient public ObjectMetadata getMetadata() { if (m_validationSession!= null) { m_validationSession.clean(this); } if (m_metadata == null) { m_metadata = new ObjectMetadata(); } return m_metadata; } @XmlTransient public void setValidationSession(ValidationSession validationSession) { m_validationSession = validationSession; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy