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

nz.co.senanque.workflow.instances.Audit Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show 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: 2016.04.01 at 11:03:38 AM NZDT 
//


package nz.co.senanque.workflow.instances;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
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.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
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.XmlSchemaType;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
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 nz.co.senanque.validationengine.annotations.WritePermission;
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 Audit complex type. * *

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

 * <complexType name="Audit">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="id" type="{http://www.w3.org/2001/XMLSchema}long"/>
 *         <element name="parentId" 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="comment">
 *           <simpleType>
 *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *               <maxLength value="512"/>
 *             </restriction>
 *           </simpleType>
 *         </element>
 *         <element name="taskId" type="{http://www.w3.org/2001/XMLSchema}long"/>
 *         <element name="handler" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
 *         <element name="interrupted" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
 *         <element name="created" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
 *         <element name="status" type="{http://www.senanque.co.nz/workflow}TaskStatus"/>
 *         <element name="lockedBy">
 *           <simpleType>
 *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *               <maxLength value="50"/>
 *             </restriction>
 *           </simpleType>
 *         </element>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Audit", propOrder = { "id", "parentId", "processDefinitionName", "comment", "taskId", "handler", "interrupted", "created", "status", "lockedBy" }) @Entity(name = "Audit") @Table(name = "AUDIT_") @Inheritance(strategy = InheritanceType.JOINED) public class Audit implements Serializable, ValidationObject, Equals, HashCode, ToString { protected long id; protected long parentId; @XmlElement(required = true) protected String processDefinitionName; @XmlElement(required = true) protected String comment; @XmlElement(required = true, type = Long.class, nillable = true) protected Long taskId; @XmlElement(required = true, type = Boolean.class, nillable = true) protected Boolean handler; @XmlElement(required = true, type = Boolean.class, nillable = true) protected Boolean interrupted; @XmlElement(required = true, type = String.class) @XmlJavaTypeAdapter(Adapter1 .class) @XmlSchemaType(name = "dateTime") protected Date created; @XmlElement(required = true, nillable = true) protected TaskStatus status; @XmlElement(required = true, nillable = true) protected String lockedBy; @XmlTransient protected ValidationSession m_validationSession; @XmlTransient protected ObjectMetadata m_metadata; @XmlTransient public final static String ID = "id"; @XmlTransient public final static String PARENTID = "parentId"; @XmlTransient public final static String PROCESSDEFINITIONNAME = "processDefinitionName"; @XmlTransient public final static String COMMENT = "comment"; @XmlTransient public final static String TASKID = "taskId"; @XmlTransient public final static String HANDLER = "handler"; @XmlTransient public final static String INTERRUPTED = "interrupted"; @XmlTransient public final static String CREATED = "created"; @XmlTransient public final static String STATUS = "status"; @XmlTransient public final static String LOCKEDBY = "lockedBy"; public Audit() { 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 parentId property. * */ @WritePermission(name = "NOONE") @Basic @Column(name = "PARENTID", precision = 20, scale = 0) public long getParentId() { if (m_validationSession!= null) { m_validationSession.clean(this); } return parentId; } /** * Sets the value of the parentId property. * */ public void setParentId(long value) { getMetadata().removeUnknown("parentId"); if (m_validationSession!= null) { m_validationSession.set(this, "parentId", value, parentId); } this.parentId = value; if (m_validationSession!= null) { m_validationSession.invokeListeners(this, "parentId", value, parentId); } } /** * Gets the value of the processDefinitionName property. * * @return * possible object is * {@link String } * */ @WritePermission(name = "NOONE") @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 comment property. * * @return * possible object is * {@link String } * */ @WritePermission(name = "NOONE") @Basic @Column(name = "COMMENT_", length = 512) 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); } } /** * 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 handler property. * * @return * possible object is * {@link Boolean } * */ @Basic @Column(name = "HANDLER_") public Boolean isHandler() { if (m_validationSession!= null) { m_validationSession.clean(this); } return handler; } /** * Sets the value of the handler property. * * @param value * allowed object is * {@link Boolean } * */ public void setHandler(Boolean value) { getMetadata().removeUnknown("handler"); if (m_validationSession!= null) { m_validationSession.set(this, "handler", value, handler); } this.handler = value; if (m_validationSession!= null) { m_validationSession.invokeListeners(this, "handler", value, handler); } } /** * Gets the value of the interrupted property. * * @return * possible object is * {@link Boolean } * */ @Basic @Column(name = "INTERRUPTED") public Boolean isInterrupted() { if (m_validationSession!= null) { m_validationSession.clean(this); } return interrupted; } /** * Sets the value of the interrupted property. * * @param value * allowed object is * {@link Boolean } * */ public void setInterrupted(Boolean value) { getMetadata().removeUnknown("interrupted"); if (m_validationSession!= null) { m_validationSession.set(this, "interrupted", value, interrupted); } this.interrupted = value; if (m_validationSession!= null) { m_validationSession.invokeListeners(this, "interrupted", value, interrupted); } } /** * Gets the value of the created property. * * @return * possible object is * {@link String } * */ @WritePermission(name = "NOONE") @Basic @Column(name = "CREATED") @Temporal(TemporalType.TIMESTAMP) public Date getCreated() { if (m_validationSession!= null) { m_validationSession.clean(this); } return created; } /** * Sets the value of the created property. * * @param value * allowed object is * {@link String } * */ public void setCreated(Date 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 status property. * * @return * possible object is * {@link TaskStatus } * */ @WritePermission(name = "NOONE") @Basic @Column(name = "STATUS", length = 255) @Enumerated(EnumType.STRING) public TaskStatus getStatus() { if (m_validationSession!= null) { m_validationSession.clean(this); } return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link TaskStatus } * */ public void setStatus(TaskStatus value) { getMetadata().removeUnknown("status"); if (m_validationSession!= null) { m_validationSession.set(this, "status", value, status); } this.status = value; if (m_validationSession!= null) { m_validationSession.invokeListeners(this, "status", value, status); } } /** * Gets the value of the lockedBy property. * * @return * possible object is * {@link String } * */ @WritePermission(name = "NOONE") @Basic @Column(name = "LOCKEDBY", length = 50) public String getLockedBy() { if (m_validationSession!= null) { m_validationSession.clean(this); } return lockedBy; } /** * Sets the value of the lockedBy property. * * @param value * allowed object is * {@link String } * */ public void setLockedBy(String value) { getMetadata().removeUnknown("lockedBy"); if (m_validationSession!= null) { m_validationSession.set(this, "lockedBy", value, lockedBy); } this.lockedBy = value; if (m_validationSession!= null) { m_validationSession.invokeListeners(this, "lockedBy", value, lockedBy); } } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Audit)) { return false; } if (this == object) { return true; } final Audit that = ((Audit) 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; } } { long lhsParentId; lhsParentId = (true?this.getParentId(): 0L); long rhsParentId; rhsParentId = (true?that.getParentId(): 0L); if (!strategy.equals(LocatorUtils.property(thisLocator, "parentId", lhsParentId), LocatorUtils.property(thatLocator, "parentId", rhsParentId), lhsParentId, rhsParentId)) { 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; } } { 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; } } { 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; } } { Boolean lhsHandler; lhsHandler = this.isHandler(); Boolean rhsHandler; rhsHandler = that.isHandler(); if (!strategy.equals(LocatorUtils.property(thisLocator, "handler", lhsHandler), LocatorUtils.property(thatLocator, "handler", rhsHandler), lhsHandler, rhsHandler)) { return false; } } { Boolean lhsInterrupted; lhsInterrupted = this.isInterrupted(); Boolean rhsInterrupted; rhsInterrupted = that.isInterrupted(); if (!strategy.equals(LocatorUtils.property(thisLocator, "interrupted", lhsInterrupted), LocatorUtils.property(thatLocator, "interrupted", rhsInterrupted), lhsInterrupted, rhsInterrupted)) { return false; } } { Date lhsCreated; lhsCreated = this.getCreated(); Date rhsCreated; rhsCreated = that.getCreated(); if (!strategy.equals(LocatorUtils.property(thisLocator, "created", lhsCreated), LocatorUtils.property(thatLocator, "created", rhsCreated), lhsCreated, rhsCreated)) { return false; } } { TaskStatus lhsStatus; lhsStatus = this.getStatus(); TaskStatus rhsStatus; rhsStatus = that.getStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus)) { return false; } } { String lhsLockedBy; lhsLockedBy = this.getLockedBy(); String rhsLockedBy; rhsLockedBy = that.getLockedBy(); if (!strategy.equals(LocatorUtils.property(thisLocator, "lockedBy", lhsLockedBy), LocatorUtils.property(thatLocator, "lockedBy", rhsLockedBy), lhsLockedBy, rhsLockedBy)) { 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); } { long theParentId; theParentId = (true?this.getParentId(): 0L); strategy.appendField(locator, this, "parentId", buffer, theParentId); } { String theProcessDefinitionName; theProcessDefinitionName = this.getProcessDefinitionName(); strategy.appendField(locator, this, "processDefinitionName", buffer, theProcessDefinitionName); } { String theComment; theComment = this.getComment(); strategy.appendField(locator, this, "comment", buffer, theComment); } { Long theTaskId; theTaskId = this.getTaskId(); strategy.appendField(locator, this, "taskId", buffer, theTaskId); } { Boolean theHandler; theHandler = this.isHandler(); strategy.appendField(locator, this, "handler", buffer, theHandler); } { Boolean theInterrupted; theInterrupted = this.isInterrupted(); strategy.appendField(locator, this, "interrupted", buffer, theInterrupted); } { Date theCreated; theCreated = this.getCreated(); strategy.appendField(locator, this, "created", buffer, theCreated); } { TaskStatus theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus); } { String theLockedBy; theLockedBy = this.getLockedBy(); strategy.appendField(locator, this, "lockedBy", buffer, theLockedBy); } 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); } { long theParentId; theParentId = (true?this.getParentId(): 0L); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "parentId", theParentId), currentHashCode, theParentId); } { String theProcessDefinitionName; theProcessDefinitionName = this.getProcessDefinitionName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "processDefinitionName", theProcessDefinitionName), currentHashCode, theProcessDefinitionName); } { String theComment; theComment = this.getComment(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "comment", theComment), currentHashCode, theComment); } { Long theTaskId; theTaskId = this.getTaskId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "taskId", theTaskId), currentHashCode, theTaskId); } { Boolean theHandler; theHandler = this.isHandler(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "handler", theHandler), currentHashCode, theHandler); } { Boolean theInterrupted; theInterrupted = this.isInterrupted(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "interrupted", theInterrupted), currentHashCode, theInterrupted); } { Date theCreated; theCreated = this.getCreated(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "created", theCreated), currentHashCode, theCreated); } { TaskStatus theStatus; theStatus = this.getStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus); } { String theLockedBy; theLockedBy = this.getLockedBy(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "lockedBy", theLockedBy), currentHashCode, theLockedBy); } 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