DocumentPersonReferenceData.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 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.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 com.hack23.cia.model.common.api.ModelObject;
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 DocumentPersonReferenceData complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="DocumentPersonReferenceData">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="intressent_id" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="namn" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="partibet" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="ordning" type="{http://www.w3.org/2001/XMLSchema}int"/>
* <element name="roll" type="{http://dokumentstatus.riksdagen.external.model.cia.hack23.com/impl}DocumentPersonReferenceRoleType"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DocumentPersonReferenceData", propOrder = {
"personReferenceId",
"referenceName",
"partyShortCode",
"orderNumber",
"roleDescription"
})
@Entity(name = "DocumentPersonReferenceData")
@Table(name = "DOCUMENT_PERSON_REFERENCE_DA_0")
@Inheritance(strategy = InheritanceType.JOINED)
public class DocumentPersonReferenceData
implements Serializable, ModelObject, Equals, HashCode, ToString
{
@XmlElement(name = "intressent_id", required = true)
protected String personReferenceId;
@XmlElement(name = "namn", required = true)
protected String referenceName;
@XmlElement(name = "partibet", required = true)
protected String partyShortCode;
@XmlElement(name = "ordning")
protected int orderNumber;
@XmlElement(name = "roll", required = true)
@XmlSchemaType(name = "string")
protected DocumentPersonReferenceRoleType roleDescription;
@XmlAttribute(name = "Hjid")
protected Long hjid;
/**
* Gets the value of the personReferenceId property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "PERSON_REFERENCE_ID", length = 255)
public String getPersonReferenceId() {
return personReferenceId;
}
/**
* Sets the value of the personReferenceId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPersonReferenceId(String value) {
this.personReferenceId = value;
}
/**
* Gets the value of the referenceName property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "REFERENCE_NAME", length = 255)
public String getReferenceName() {
return referenceName;
}
/**
* Sets the value of the referenceName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setReferenceName(String value) {
this.referenceName = value;
}
/**
* Gets the value of the partyShortCode property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "PARTY_SHORT_CODE", length = 255)
public String getPartyShortCode() {
return partyShortCode;
}
/**
* Sets the value of the partyShortCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPartyShortCode(String value) {
this.partyShortCode = value;
}
/**
* Gets the value of the orderNumber property.
*
*/
@Basic
@Column(name = "ORDER_NUMBER", precision = 10, scale = 0)
public int getOrderNumber() {
return orderNumber;
}
/**
* Sets the value of the orderNumber property.
*
*/
public void setOrderNumber(int value) {
this.orderNumber = value;
}
/**
* Gets the value of the roleDescription property.
*
* @return
* possible object is
* {@link DocumentPersonReferenceRoleType }
*
*/
@Basic
@Column(name = "ROLE_DESCRIPTION", length = 255)
@Enumerated(EnumType.STRING)
public DocumentPersonReferenceRoleType getRoleDescription() {
return roleDescription;
}
/**
* Sets the value of the roleDescription property.
*
* @param value
* allowed object is
* {@link DocumentPersonReferenceRoleType }
*
*/
public void setRoleDescription(DocumentPersonReferenceRoleType value) {
this.roleDescription = value;
}
public DocumentPersonReferenceData withPersonReferenceId(String value) {
setPersonReferenceId(value);
return this;
}
public DocumentPersonReferenceData withReferenceName(String value) {
setReferenceName(value);
return this;
}
public DocumentPersonReferenceData withPartyShortCode(String value) {
setPartyShortCode(value);
return this;
}
public DocumentPersonReferenceData withOrderNumber(int value) {
setOrderNumber(value);
return this;
}
public DocumentPersonReferenceData withRoleDescription(DocumentPersonReferenceRoleType value) {
setRoleDescription(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) {
{
String thePersonReferenceId;
thePersonReferenceId = this.getPersonReferenceId();
strategy.appendField(locator, this, "personReferenceId", buffer, thePersonReferenceId);
}
{
String theReferenceName;
theReferenceName = this.getReferenceName();
strategy.appendField(locator, this, "referenceName", buffer, theReferenceName);
}
{
String thePartyShortCode;
thePartyShortCode = this.getPartyShortCode();
strategy.appendField(locator, this, "partyShortCode", buffer, thePartyShortCode);
}
{
int theOrderNumber;
theOrderNumber = this.getOrderNumber();
strategy.appendField(locator, this, "orderNumber", buffer, theOrderNumber);
}
{
DocumentPersonReferenceRoleType theRoleDescription;
theRoleDescription = this.getRoleDescription();
strategy.appendField(locator, this, "roleDescription", buffer, theRoleDescription);
}
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 DocumentPersonReferenceData that = ((DocumentPersonReferenceData) object);
{
String lhsPersonReferenceId;
lhsPersonReferenceId = this.getPersonReferenceId();
String rhsPersonReferenceId;
rhsPersonReferenceId = that.getPersonReferenceId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "personReferenceId", lhsPersonReferenceId), LocatorUtils.property(thatLocator, "personReferenceId", rhsPersonReferenceId), lhsPersonReferenceId, rhsPersonReferenceId)) {
return false;
}
}
{
String lhsReferenceName;
lhsReferenceName = this.getReferenceName();
String rhsReferenceName;
rhsReferenceName = that.getReferenceName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "referenceName", lhsReferenceName), LocatorUtils.property(thatLocator, "referenceName", rhsReferenceName), lhsReferenceName, rhsReferenceName)) {
return false;
}
}
{
String lhsPartyShortCode;
lhsPartyShortCode = this.getPartyShortCode();
String rhsPartyShortCode;
rhsPartyShortCode = that.getPartyShortCode();
if (!strategy.equals(LocatorUtils.property(thisLocator, "partyShortCode", lhsPartyShortCode), LocatorUtils.property(thatLocator, "partyShortCode", rhsPartyShortCode), lhsPartyShortCode, rhsPartyShortCode)) {
return false;
}
}
{
int lhsOrderNumber;
lhsOrderNumber = this.getOrderNumber();
int rhsOrderNumber;
rhsOrderNumber = that.getOrderNumber();
if (!strategy.equals(LocatorUtils.property(thisLocator, "orderNumber", lhsOrderNumber), LocatorUtils.property(thatLocator, "orderNumber", rhsOrderNumber), lhsOrderNumber, rhsOrderNumber)) {
return false;
}
}
{
DocumentPersonReferenceRoleType lhsRoleDescription;
lhsRoleDescription = this.getRoleDescription();
DocumentPersonReferenceRoleType rhsRoleDescription;
rhsRoleDescription = that.getRoleDescription();
if (!strategy.equals(LocatorUtils.property(thisLocator, "roleDescription", lhsRoleDescription), LocatorUtils.property(thatLocator, "roleDescription", rhsRoleDescription), lhsRoleDescription, rhsRoleDescription)) {
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 thePersonReferenceId;
thePersonReferenceId = this.getPersonReferenceId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "personReferenceId", thePersonReferenceId), currentHashCode, thePersonReferenceId);
}
{
String theReferenceName;
theReferenceName = this.getReferenceName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "referenceName", theReferenceName), currentHashCode, theReferenceName);
}
{
String thePartyShortCode;
thePartyShortCode = this.getPartyShortCode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partyShortCode", thePartyShortCode), currentHashCode, thePartyShortCode);
}
{
int theOrderNumber;
theOrderNumber = this.getOrderNumber();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orderNumber", theOrderNumber), currentHashCode, theOrderNumber);
}
{
DocumentPersonReferenceRoleType theRoleDescription;
theRoleDescription = this.getRoleDescription();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "roleDescription", theRoleDescription), currentHashCode, theRoleDescription);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}