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

org.meridor.perspective.events.BaseEvent Maven / Gradle / Ivy

The newest version!

package org.meridor.perspective.events;

import java.io.Serializable;
import java.time.ZonedDateTime;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
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;
import org.w3._2001.xmlschema.Adapter1;


/**
 * 

Java class for baseEvent complex type. * *

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

 * <complexType name="baseEvent">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="id" type="{urn:beans.perspective.meridor.org}uuid"/>
 *         <element name="timestamp" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
 *         <element name="sync" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "baseEvent", propOrder = { "id", "timestamp", "sync" }) @XmlSeeAlso({ ProjectEvent.class, InstanceEvent.class, ImageEvent.class }) public abstract class BaseEvent implements Serializable, Equals, HashCode, ToString { @XmlElement(required = true) protected String id; @XmlElement(required = true, type = String.class) @XmlJavaTypeAdapter(Adapter1 .class) @XmlSchemaType(name = "dateTime") protected ZonedDateTime timestamp; protected boolean sync; /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the timestamp property. * * @return * possible object is * {@link String } * */ public ZonedDateTime getTimestamp() { return timestamp; } /** * Sets the value of the timestamp property. * * @param value * allowed object is * {@link String } * */ public void setTimestamp(ZonedDateTime value) { this.timestamp = value; } /** * Gets the value of the sync property. * */ public boolean isSync() { return sync; } /** * Sets the value of the sync property. * */ public void setSync(boolean value) { this.sync = value; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof BaseEvent)) { return false; } if (this == object) { return true; } final BaseEvent that = ((BaseEvent) object); { String lhsId; lhsId = this.getId(); String rhsId; rhsId = that.getId(); if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) { return false; } } { ZonedDateTime lhsTimestamp; lhsTimestamp = this.getTimestamp(); ZonedDateTime rhsTimestamp; rhsTimestamp = that.getTimestamp(); if (!strategy.equals(LocatorUtils.property(thisLocator, "timestamp", lhsTimestamp), LocatorUtils.property(thatLocator, "timestamp", rhsTimestamp), lhsTimestamp, rhsTimestamp)) { return false; } } { boolean lhsSync; lhsSync = this.isSync(); boolean rhsSync; rhsSync = that.isSync(); if (!strategy.equals(LocatorUtils.property(thisLocator, "sync", lhsSync), LocatorUtils.property(thatLocator, "sync", rhsSync), lhsSync, rhsSync)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theId; theId = this.getId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId); } { ZonedDateTime theTimestamp; theTimestamp = this.getTimestamp(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "timestamp", theTimestamp), currentHashCode, theTimestamp); } { boolean theSync; theSync = this.isSync(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sync", theSync), currentHashCode, theSync); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, 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 theId; theId = this.getId(); strategy.appendField(locator, this, "id", buffer, theId); } { ZonedDateTime theTimestamp; theTimestamp = this.getTimestamp(); strategy.appendField(locator, this, "timestamp", buffer, theTimestamp); } { boolean theSync; theSync = this.isSync(); strategy.appendField(locator, this, "sync", buffer, theSync); } return buffer; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy