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

nz.co.senanque.workflow.orderinstances.OrderItem Maven / Gradle / Ivy

Go to download

Example of a simple workflow in a bundle. This workflow doesn't actually do anything.

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:08 PM UTC 
//


package nz.co.senanque.workflow.orderinstances;

import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
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.persistence.Version;
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.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 nz.co.senanque.validationengine.annotations.Label;
import nz.co.senanque.validationengine.annotations.Length;
import nz.co.senanque.validationengine.annotations.Range;
import org.jvnet.hyperjaxb3.xml.bind.annotation.adapters.XMLGregorianCalendarAsDateTime;
import org.jvnet.hyperjaxb3.xml.bind.annotation.adapters.XmlAdapterUtils;
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 OrderItem complex type. * *

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

 * <complexType name="OrderItem">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="id" type="{http://www.w3.org/2001/XMLSchema}long"/>
 *         <element name="version" type="{http://www.w3.org/2001/XMLSchema}long"/>
 *         <element name="itemName">
 *           <simpleType>
 *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *               <maxLength value="50"/>
 *             </restriction>
 *           </simpleType>
 *         </element>
 *         <element name="approved" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
 *         <element name="created" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "OrderItem", propOrder = { "id", "version", "itemName", "approved", "created" }) @Entity(name = "OrderItem") @Table(name = "ORDERITEM") @Inheritance(strategy = InheritanceType.JOINED) public class OrderItem implements ValidationObject, Equals, HashCode, ToString { protected long id; protected long version; @XmlElement(required = true) protected String itemName; protected boolean approved; @XmlElement(required = true) @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar created; @XmlTransient protected ValidationSession m_validationSession; @XmlTransient protected ObjectMetadata m_metadata; @XmlTransient public final static String ID = "id"; @XmlTransient public final static String VERSION = "version"; @XmlTransient public final static String ITEMNAME = "itemName"; @XmlTransient public final static String APPROVED = "approved"; @XmlTransient public final static String CREATED = "created"; @XmlTransient public final static String CREATEDITEM = "createdItem"; public OrderItem() { ValidationUtils.setDefaults(this); } /** * Gets the value of the id property. * */ @Id @Column(name = "ID", scale = 0) @GeneratedValue(strategy = GenerationType.AUTO) @Range(maxInclusive = "9223372036854775807", minInclusive = "-9223372036854775808") 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 version property. * */ @Version @Column(name = "VERSION_", scale = 0) @Range(maxInclusive = "9223372036854775807", minInclusive = "-9223372036854775808") public long getVersion() { if (m_validationSession!= null) { m_validationSession.clean(this); } return version; } /** * Sets the value of the version property. * */ public void setVersion(long value) { getMetadata().removeUnknown("version"); if (m_validationSession!= null) { m_validationSession.set(this, "version", value, version); } this.version = value; if (m_validationSession!= null) { m_validationSession.invokeListeners(this, "version", value, version); } } /** * Gets the value of the itemName property. * * @return * possible object is * {@link String } * */ @Label(labelName = "Item Name") @Basic @Column(name = "ITEMNAME", length = 50) @Length(minLength = "0", maxLength = "50") public String getItemName() { if (m_validationSession!= null) { m_validationSession.clean(this); } return itemName; } /** * Sets the value of the itemName property. * * @param value * allowed object is * {@link String } * */ public void setItemName(String value) { getMetadata().removeUnknown("itemName"); if (m_validationSession!= null) { m_validationSession.set(this, "itemName", value, itemName); } this.itemName = value; if (m_validationSession!= null) { m_validationSession.invokeListeners(this, "itemName", value, itemName); } } /** * Gets the value of the approved property. * */ @Basic @Column(name = "APPROVED") public boolean isApproved() { if (m_validationSession!= null) { m_validationSession.clean(this); } return approved; } /** * Sets the value of the approved property. * */ public void setApproved(boolean value) { getMetadata().removeUnknown("approved"); if (m_validationSession!= null) { m_validationSession.set(this, "approved", value, approved); } this.approved = value; if (m_validationSession!= null) { m_validationSession.invokeListeners(this, "approved", value, approved); } } /** * Gets the value of the created property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ @Transient public XMLGregorianCalendar getCreated() { if (m_validationSession!= null) { m_validationSession.clean(this); } return created; } /** * Sets the value of the created property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setCreated(XMLGregorianCalendar 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); } } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof OrderItem)) { return false; } if (this == object) { return true; } final OrderItem that = ((OrderItem) 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 lhsVersion; lhsVersion = (true?this.getVersion(): 0L); long rhsVersion; rhsVersion = (true?that.getVersion(): 0L); if (!strategy.equals(LocatorUtils.property(thisLocator, "version", lhsVersion), LocatorUtils.property(thatLocator, "version", rhsVersion), lhsVersion, rhsVersion)) { return false; } } { String lhsItemName; lhsItemName = this.getItemName(); String rhsItemName; rhsItemName = that.getItemName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "itemName", lhsItemName), LocatorUtils.property(thatLocator, "itemName", rhsItemName), lhsItemName, rhsItemName)) { return false; } } { boolean lhsApproved; lhsApproved = (true?this.isApproved():false); boolean rhsApproved; rhsApproved = (true?that.isApproved():false); if (!strategy.equals(LocatorUtils.property(thisLocator, "approved", lhsApproved), LocatorUtils.property(thatLocator, "approved", rhsApproved), lhsApproved, rhsApproved)) { return false; } } { XMLGregorianCalendar lhsCreated; lhsCreated = this.getCreated(); XMLGregorianCalendar rhsCreated; rhsCreated = that.getCreated(); if (!strategy.equals(LocatorUtils.property(thisLocator, "created", lhsCreated), LocatorUtils.property(thatLocator, "created", rhsCreated), lhsCreated, rhsCreated)) { 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 theVersion; theVersion = (true?this.getVersion(): 0L); strategy.appendField(locator, this, "version", buffer, theVersion); } { String theItemName; theItemName = this.getItemName(); strategy.appendField(locator, this, "itemName", buffer, theItemName); } { boolean theApproved; theApproved = (true?this.isApproved():false); strategy.appendField(locator, this, "approved", buffer, theApproved); } { XMLGregorianCalendar theCreated; theCreated = this.getCreated(); strategy.appendField(locator, this, "created", buffer, theCreated); } 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 theVersion; theVersion = (true?this.getVersion(): 0L); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "version", theVersion), currentHashCode, theVersion); } { String theItemName; theItemName = this.getItemName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "itemName", theItemName), currentHashCode, theItemName); } { boolean theApproved; theApproved = (true?this.isApproved():false); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "approved", theApproved), currentHashCode, theApproved); } { XMLGregorianCalendar theCreated; theCreated = this.getCreated(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "created", theCreated), currentHashCode, theCreated); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } @Basic @Column(name = "CREATEDITEM") @Temporal(TemporalType.TIMESTAMP) public Date getCreatedItem() { if (m_validationSession!= null) { m_validationSession.clean(this); } return XmlAdapterUtils.unmarshall(XMLGregorianCalendarAsDateTime.class, this.getCreated()); } public void setCreatedItem(Date target) { setCreated(XmlAdapterUtils.marshall(XMLGregorianCalendarAsDateTime.class, target)); } @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