
nz.co.senanque.workflow.instances.DeferredEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of madura-workflow Show documentation
Show all versions of madura-workflow Show documentation
Workflow engine that integrates Madura.
//
// 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: 2016.04.01 at 11:03:38 AM NZDT
//
package nz.co.senanque.workflow.instances;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
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.XmlTransient;
import javax.xml.bind.annotation.XmlType;
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 DeferredEvent complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="DeferredEvent">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}long"/>
* <element name="processDefinitionName">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <maxLength value="50"/>
* </restriction>
* </simpleType>
* </element>
* <element name="taskId" type="{http://www.w3.org/2001/XMLSchema}long"/>
* <element name="eventType" type="{http://www.senanque.co.nz/workflow}EventType"/>
* <element name="created" type="{http://www.w3.org/2001/XMLSchema}long"/>
* <element name="fire" type="{http://www.w3.org/2001/XMLSchema}long"/>
* <element name="processInstance" type="{http://www.senanque.co.nz/workflow}ProcessInstance"/>
* <element name="comment">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <maxLength value="500"/>
* </restriction>
* </simpleType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DeferredEvent", propOrder = {
"id",
"processDefinitionName",
"taskId",
"eventType",
"created",
"fire",
"processInstance",
"comment"
})
@Entity(name = "DeferredEvent")
@Table(name = "DEFERREDEVENT")
@Inheritance(strategy = InheritanceType.JOINED)
public class DeferredEvent
implements Serializable, ValidationObject, Equals, HashCode, ToString
{
protected long id;
@XmlElement(required = true, nillable = true)
protected String processDefinitionName;
@XmlElement(required = true, type = Long.class, nillable = true)
protected Long taskId;
@XmlElement(required = true)
protected EventType eventType;
protected long created;
@XmlElement(required = true, type = Long.class, nillable = true)
protected Long fire;
@XmlElement(required = true)
protected ProcessInstance processInstance;
@XmlElement(required = true)
protected String comment;
@XmlTransient
protected ValidationSession m_validationSession;
@XmlTransient
protected ObjectMetadata m_metadata;
@XmlTransient
public final static String ID = "id";
@XmlTransient
public final static String PROCESSDEFINITIONNAME = "processDefinitionName";
@XmlTransient
public final static String TASKID = "taskId";
@XmlTransient
public final static String EVENTTYPE = "eventType";
@XmlTransient
public final static String CREATED = "created";
@XmlTransient
public final static String FIRE = "fire";
@XmlTransient
public final static String PROCESSINSTANCE = "processInstance";
@XmlTransient
public final static String COMMENT = "comment";
public DeferredEvent() {
ValidationUtils.setDefaults(this);
}
/**
* Gets the value of the id property.
*
*/
@Id
@Column(name = "ID", scale = 0)
@GeneratedValue(strategy = GenerationType.AUTO)
public long getId() {
if (m_validationSession!= null) {
m_validationSession.clean(this);
}
return id;
}
/**
* Sets the value of the id property.
*
*/
public void setId(long value) {
getMetadata().removeUnknown("id");
if (m_validationSession!= null) {
m_validationSession.set(this, "id", value, id);
}
this.id = value;
if (m_validationSession!= null) {
m_validationSession.invokeListeners(this, "id", value, id);
}
}
/**
* Gets the value of the processDefinitionName property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "PROCESSDEFINITIONNAME", length = 50)
public String getProcessDefinitionName() {
if (m_validationSession!= null) {
m_validationSession.clean(this);
}
return processDefinitionName;
}
/**
* Sets the value of the processDefinitionName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProcessDefinitionName(String value) {
getMetadata().removeUnknown("processDefinitionName");
if (m_validationSession!= null) {
m_validationSession.set(this, "processDefinitionName", value, processDefinitionName);
}
this.processDefinitionName = value;
if (m_validationSession!= null) {
m_validationSession.invokeListeners(this, "processDefinitionName", value, processDefinitionName);
}
}
/**
* Gets the value of the taskId property.
*
* @return
* possible object is
* {@link Long }
*
*/
@Basic
@Column(name = "TASKID", precision = 20, scale = 0)
public Long getTaskId() {
if (m_validationSession!= null) {
m_validationSession.clean(this);
}
return taskId;
}
/**
* Sets the value of the taskId property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setTaskId(Long value) {
getMetadata().removeUnknown("taskId");
if (m_validationSession!= null) {
m_validationSession.set(this, "taskId", value, taskId);
}
this.taskId = value;
if (m_validationSession!= null) {
m_validationSession.invokeListeners(this, "taskId", value, taskId);
}
}
/**
* Gets the value of the eventType property.
*
* @return
* possible object is
* {@link EventType }
*
*/
@Basic
@Column(name = "EVENTTYPE", length = 255)
@Enumerated(EnumType.STRING)
public EventType getEventType() {
if (m_validationSession!= null) {
m_validationSession.clean(this);
}
return eventType;
}
/**
* Sets the value of the eventType property.
*
* @param value
* allowed object is
* {@link EventType }
*
*/
public void setEventType(EventType value) {
getMetadata().removeUnknown("eventType");
if (m_validationSession!= null) {
m_validationSession.set(this, "eventType", value, eventType);
}
this.eventType = value;
if (m_validationSession!= null) {
m_validationSession.invokeListeners(this, "eventType", value, eventType);
}
}
/**
* Gets the value of the created property.
*
*/
@Basic
@Column(name = "CREATED", precision = 20, scale = 0)
public long getCreated() {
if (m_validationSession!= null) {
m_validationSession.clean(this);
}
return created;
}
/**
* Sets the value of the created property.
*
*/
public void setCreated(long value) {
getMetadata().removeUnknown("created");
if (m_validationSession!= null) {
m_validationSession.set(this, "created", value, created);
}
this.created = value;
if (m_validationSession!= null) {
m_validationSession.invokeListeners(this, "created", value, created);
}
}
/**
* Gets the value of the fire property.
*
* @return
* possible object is
* {@link Long }
*
*/
@Basic
@Column(name = "FIRE", precision = 20, scale = 0)
public Long getFire() {
if (m_validationSession!= null) {
m_validationSession.clean(this);
}
return fire;
}
/**
* Sets the value of the fire property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setFire(Long value) {
getMetadata().removeUnknown("fire");
if (m_validationSession!= null) {
m_validationSession.set(this, "fire", value, fire);
}
this.fire = value;
if (m_validationSession!= null) {
m_validationSession.invokeListeners(this, "fire", value, fire);
}
}
/**
* Gets the value of the processInstance property.
*
* @return
* possible object is
* {@link ProcessInstance }
*
*/
@ManyToOne(targetEntity = ProcessInstance.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "PROCESSINSTANCE_DEFERREDEVEN_0")
public ProcessInstance getProcessInstance() {
if (m_validationSession!= null) {
m_validationSession.clean(this);
}
return processInstance;
}
/**
* Sets the value of the processInstance property.
*
* @param value
* allowed object is
* {@link ProcessInstance }
*
*/
public void setProcessInstance(ProcessInstance value) {
getMetadata().removeUnknown("processInstance");
if (m_validationSession!= null) {
m_validationSession.set(this, "processInstance", value, processInstance);
}
this.processInstance = value;
if (m_validationSession!= null) {
m_validationSession.invokeListeners(this, "processInstance", value, processInstance);
}
}
/**
* Gets the value of the comment property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "COMMENT_", length = 500)
public String getComment() {
if (m_validationSession!= null) {
m_validationSession.clean(this);
}
return comment;
}
/**
* Sets the value of the comment property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setComment(String value) {
getMetadata().removeUnknown("comment");
if (m_validationSession!= null) {
m_validationSession.set(this, "comment", value, comment);
}
this.comment = value;
if (m_validationSession!= null) {
m_validationSession.invokeListeners(this, "comment", value, comment);
}
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof DeferredEvent)) {
return false;
}
if (this == object) {
return true;
}
final DeferredEvent that = ((DeferredEvent) object);
{
long lhsId;
lhsId = (true?this.getId(): 0L);
long rhsId;
rhsId = (true?that.getId(): 0L);
if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
return false;
}
}
{
String lhsProcessDefinitionName;
lhsProcessDefinitionName = this.getProcessDefinitionName();
String rhsProcessDefinitionName;
rhsProcessDefinitionName = that.getProcessDefinitionName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "processDefinitionName", lhsProcessDefinitionName), LocatorUtils.property(thatLocator, "processDefinitionName", rhsProcessDefinitionName), lhsProcessDefinitionName, rhsProcessDefinitionName)) {
return false;
}
}
{
Long lhsTaskId;
lhsTaskId = this.getTaskId();
Long rhsTaskId;
rhsTaskId = that.getTaskId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "taskId", lhsTaskId), LocatorUtils.property(thatLocator, "taskId", rhsTaskId), lhsTaskId, rhsTaskId)) {
return false;
}
}
{
EventType lhsEventType;
lhsEventType = this.getEventType();
EventType rhsEventType;
rhsEventType = that.getEventType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "eventType", lhsEventType), LocatorUtils.property(thatLocator, "eventType", rhsEventType), lhsEventType, rhsEventType)) {
return false;
}
}
{
long lhsCreated;
lhsCreated = (true?this.getCreated(): 0L);
long rhsCreated;
rhsCreated = (true?that.getCreated(): 0L);
if (!strategy.equals(LocatorUtils.property(thisLocator, "created", lhsCreated), LocatorUtils.property(thatLocator, "created", rhsCreated), lhsCreated, rhsCreated)) {
return false;
}
}
{
Long lhsFire;
lhsFire = this.getFire();
Long rhsFire;
rhsFire = that.getFire();
if (!strategy.equals(LocatorUtils.property(thisLocator, "fire", lhsFire), LocatorUtils.property(thatLocator, "fire", rhsFire), lhsFire, rhsFire)) {
return false;
}
}
{
ProcessInstance lhsProcessInstance;
lhsProcessInstance = this.getProcessInstance();
ProcessInstance rhsProcessInstance;
rhsProcessInstance = that.getProcessInstance();
if (!strategy.equals(LocatorUtils.property(thisLocator, "processInstance", lhsProcessInstance), LocatorUtils.property(thatLocator, "processInstance", rhsProcessInstance), lhsProcessInstance, rhsProcessInstance)) {
return false;
}
}
{
String lhsComment;
lhsComment = this.getComment();
String rhsComment;
rhsComment = that.getComment();
if (!strategy.equals(LocatorUtils.property(thisLocator, "comment", lhsComment), LocatorUtils.property(thatLocator, "comment", rhsComment), lhsComment, rhsComment)) {
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) {
{
long theId;
theId = (true?this.getId(): 0L);
strategy.appendField(locator, this, "id", buffer, theId);
}
{
String theProcessDefinitionName;
theProcessDefinitionName = this.getProcessDefinitionName();
strategy.appendField(locator, this, "processDefinitionName", buffer, theProcessDefinitionName);
}
{
Long theTaskId;
theTaskId = this.getTaskId();
strategy.appendField(locator, this, "taskId", buffer, theTaskId);
}
{
EventType theEventType;
theEventType = this.getEventType();
strategy.appendField(locator, this, "eventType", buffer, theEventType);
}
{
long theCreated;
theCreated = (true?this.getCreated(): 0L);
strategy.appendField(locator, this, "created", buffer, theCreated);
}
{
Long theFire;
theFire = this.getFire();
strategy.appendField(locator, this, "fire", buffer, theFire);
}
{
ProcessInstance theProcessInstance;
theProcessInstance = this.getProcessInstance();
strategy.appendField(locator, this, "processInstance", buffer, theProcessInstance);
}
{
String theComment;
theComment = this.getComment();
strategy.appendField(locator, this, "comment", buffer, theComment);
}
return buffer;
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
long theId;
theId = (true?this.getId(): 0L);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
}
{
String theProcessDefinitionName;
theProcessDefinitionName = this.getProcessDefinitionName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "processDefinitionName", theProcessDefinitionName), currentHashCode, theProcessDefinitionName);
}
{
Long theTaskId;
theTaskId = this.getTaskId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "taskId", theTaskId), currentHashCode, theTaskId);
}
{
EventType theEventType;
theEventType = this.getEventType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "eventType", theEventType), currentHashCode, theEventType);
}
{
long theCreated;
theCreated = (true?this.getCreated(): 0L);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "created", theCreated), currentHashCode, theCreated);
}
{
Long theFire;
theFire = this.getFire();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "fire", theFire), currentHashCode, theFire);
}
{
ProcessInstance theProcessInstance;
theProcessInstance = this.getProcessInstance();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "processInstance", theProcessInstance), currentHashCode, theProcessInstance);
}
{
String theComment;
theComment = this.getComment();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "comment", theComment), currentHashCode, theComment);
}
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 - 2025 Weber Informatics LLC | Privacy Policy