DocumentActivityData.java
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.10.06 at 11:57:57 AM CEST
//
package com.hack23.cia.model.external.riksdagen.dokumentstatus.impl;
import java.io.Serializable;
import java.math.BigInteger;
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.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import com.hack23.cia.model.common.api.ModelObject;
import com.hack23.cia.model.common.impl.xml.XmlDateTypeAdapter;
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;
/**
* <p>Java class for DocumentActivityData complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="DocumentActivityData">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="datum" type="{http://www.w3.org/2001/XMLSchema}date"/>
* <element name="kod" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="namn" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="ordning" type="{http://www.w3.org/2001/XMLSchema}integer"/>
* <element name="process" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="status" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DocumentActivityData", propOrder = {
"createdDate",
"code",
"activityName",
"orderNumber",
"process",
"status"
})
@Entity(name = "DocumentActivityData")
@Table(name = "DOCUMENT_ACTIVITY_DATA")
@Inheritance(strategy = InheritanceType.JOINED)
public class DocumentActivityData
implements Serializable, ModelObject, Equals, HashCode, ToString
{
@XmlElement(name = "datum", required = true, type = String.class)
@XmlJavaTypeAdapter(XmlDateTypeAdapter.class)
@XmlSchemaType(name = "date")
protected Date createdDate;
@XmlElement(name = "kod", required = true)
protected String code;
@XmlElement(name = "namn", required = true)
protected String activityName;
@XmlElement(name = "ordning", required = true)
protected BigInteger orderNumber;
@XmlElement(required = true)
protected String process;
@XmlElement(required = true)
protected String status;
@XmlAttribute(name = "Hjid")
protected Long hjid;
/**
* Gets the value of the createdDate property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "CREATED_DATE")
@Temporal(TemporalType.DATE)
public Date getCreatedDate() {
return createdDate;
}
/**
* Sets the value of the createdDate property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCreatedDate(Date value) {
this.createdDate = value;
}
/**
* Gets the value of the code property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "CODE", length = 255)
public String getCode() {
return code;
}
/**
* Sets the value of the code property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCode(String value) {
this.code = value;
}
/**
* Gets the value of the activityName property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "ACTIVITY_NAME", length = 255)
public String getActivityName() {
return activityName;
}
/**
* Sets the value of the activityName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setActivityName(String value) {
this.activityName = value;
}
/**
* Gets the value of the orderNumber property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
@Basic
@Column(name = "ORDER_NUMBER", precision = 20, scale = 0)
public BigInteger getOrderNumber() {
return orderNumber;
}
/**
* Sets the value of the orderNumber property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setOrderNumber(BigInteger value) {
this.orderNumber = value;
}
/**
* Gets the value of the process property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "PROCESS", length = 255)
public String getProcess() {
return process;
}
/**
* Sets the value of the process property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProcess(String value) {
this.process = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "STATUS", length = 255)
public String getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStatus(String value) {
this.status = value;
}
public DocumentActivityData withCreatedDate(Date value) {
setCreatedDate(value);
return this;
}
public DocumentActivityData withCode(String value) {
setCode(value);
return this;
}
public DocumentActivityData withActivityName(String value) {
setActivityName(value);
return this;
}
public DocumentActivityData withOrderNumber(BigInteger value) {
setOrderNumber(value);
return this;
}
public DocumentActivityData withProcess(String value) {
setProcess(value);
return this;
}
public DocumentActivityData withStatus(String value) {
setStatus(value);
return this;
}
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) {
{
Date theCreatedDate;
theCreatedDate = this.getCreatedDate();
strategy.appendField(locator, this, "createdDate", buffer, theCreatedDate);
}
{
String theCode;
theCode = this.getCode();
strategy.appendField(locator, this, "code", buffer, theCode);
}
{
String theActivityName;
theActivityName = this.getActivityName();
strategy.appendField(locator, this, "activityName", buffer, theActivityName);
}
{
BigInteger theOrderNumber;
theOrderNumber = this.getOrderNumber();
strategy.appendField(locator, this, "orderNumber", buffer, theOrderNumber);
}
{
String theProcess;
theProcess = this.getProcess();
strategy.appendField(locator, this, "process", buffer, theProcess);
}
{
String theStatus;
theStatus = this.getStatus();
strategy.appendField(locator, this, "status", buffer, theStatus);
}
return buffer;
}
/**
* Gets the value of the hjid property.
*
* @return
* possible object is
* {@link Long }
*
*/
@Id
@Column(name = "HJID")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getHjid() {
return hjid;
}
/**
* Sets the value of the hjid property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setHjid(Long value) {
this.hjid = value;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final DocumentActivityData that = ((DocumentActivityData) object);
{
Date lhsCreatedDate;
lhsCreatedDate = this.getCreatedDate();
Date rhsCreatedDate;
rhsCreatedDate = that.getCreatedDate();
if (!strategy.equals(LocatorUtils.property(thisLocator, "createdDate", lhsCreatedDate), LocatorUtils.property(thatLocator, "createdDate", rhsCreatedDate), lhsCreatedDate, rhsCreatedDate)) {
return false;
}
}
{
String lhsCode;
lhsCode = this.getCode();
String rhsCode;
rhsCode = that.getCode();
if (!strategy.equals(LocatorUtils.property(thisLocator, "code", lhsCode), LocatorUtils.property(thatLocator, "code", rhsCode), lhsCode, rhsCode)) {
return false;
}
}
{
String lhsActivityName;
lhsActivityName = this.getActivityName();
String rhsActivityName;
rhsActivityName = that.getActivityName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "activityName", lhsActivityName), LocatorUtils.property(thatLocator, "activityName", rhsActivityName), lhsActivityName, rhsActivityName)) {
return false;
}
}
{
BigInteger lhsOrderNumber;
lhsOrderNumber = this.getOrderNumber();
BigInteger rhsOrderNumber;
rhsOrderNumber = that.getOrderNumber();
if (!strategy.equals(LocatorUtils.property(thisLocator, "orderNumber", lhsOrderNumber), LocatorUtils.property(thatLocator, "orderNumber", rhsOrderNumber), lhsOrderNumber, rhsOrderNumber)) {
return false;
}
}
{
String lhsProcess;
lhsProcess = this.getProcess();
String rhsProcess;
rhsProcess = that.getProcess();
if (!strategy.equals(LocatorUtils.property(thisLocator, "process", lhsProcess), LocatorUtils.property(thatLocator, "process", rhsProcess), lhsProcess, rhsProcess)) {
return false;
}
}
{
String lhsStatus;
lhsStatus = this.getStatus();
String rhsStatus;
rhsStatus = that.getStatus();
if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus)) {
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;
{
Date theCreatedDate;
theCreatedDate = this.getCreatedDate();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "createdDate", theCreatedDate), currentHashCode, theCreatedDate);
}
{
String theCode;
theCode = this.getCode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode);
}
{
String theActivityName;
theActivityName = this.getActivityName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "activityName", theActivityName), currentHashCode, theActivityName);
}
{
BigInteger theOrderNumber;
theOrderNumber = this.getOrderNumber();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderNumber", theOrderNumber), currentHashCode, theOrderNumber);
}
{
String theProcess;
theProcess = this.getProcess();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "process", theProcess), currentHashCode, theProcess);
}
{
String theStatus;
theStatus = this.getStatus();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}