DocumentProposalData.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.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.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 DocumentProposalData complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="DocumentProposalData"&gt;
 *   &lt;complexContent&gt;
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
 *       &lt;sequence&gt;
 *         &lt;element name="nummer" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
 *         &lt;element name="beteckning" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;
 *         &lt;element name="lydelse" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="lydelse2" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="lydelse3" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="lydelse4" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="utskottet" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="kammaren" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="behandlas_i" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *         &lt;element name="kammarbeslutstyp" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
 *       &lt;/sequence&gt;
 *     &lt;/restriction&gt;
 *   &lt;/complexContent&gt;
 * &lt;/complexType&gt;
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DocumentProposalData", propOrder = {
    "proposalNumber",
    "designation",
    "wording",
    "wording2",
    "wording3",
    "wording4",
    "committee",
    "chamber",
    "processedIn",
    "decisionType"
})
@Entity(name = "DocumentProposalData")
@Table(name = "DOCUMENT_PROPOSAL_DATA")
@Inheritance(strategy = InheritanceType.JOINED)
public class DocumentProposalData
    implements Serializable, ModelObject, Equals, HashCode, ToString
{

    @XmlElement(name = "nummer")
    protected int proposalNumber;
    @XmlElement(name = "beteckning")
    protected int designation;
    @XmlElement(name = "lydelse", required = true)
    protected String wording;
    @XmlElement(name = "lydelse2", required = true)
    protected String wording2;
    @XmlElement(name = "lydelse3", required = true)
    protected String wording3;
    @XmlElement(name = "lydelse4", required = true)
    protected String wording4;
    @XmlElement(name = "utskottet", required = true)
    protected String committee;
    @XmlElement(name = "kammaren", required = true)
    protected String chamber;
    @XmlElement(name = "behandlas_i", required = true)
    protected String processedIn;
    @XmlElement(name = "kammarbeslutstyp", required = true)
    protected String decisionType;
    @XmlAttribute(name = "Hjid")
    protected Long hjid;

    /**
     * Gets the value of the proposalNumber property.
     * 
     */
    @Basic
    @Column(name = "PROPOSAL_NUMBER", precision = 10, scale = 0)
    public int getProposalNumber() {
        return proposalNumber;
    }

    /**
     * Sets the value of the proposalNumber property.
     * 
     */
    public void setProposalNumber(int value) {
        this.proposalNumber = value;
    }

    /**
     * Gets the value of the designation property.
     * 
     */
    @Basic
    @Column(name = "DESIGNATION", precision = 10, scale = 0)
    public int getDesignation() {
        return designation;
    }

    /**
     * Sets the value of the designation property.
     * 
     */
    public void setDesignation(int value) {
        this.designation = value;
    }

    /**
     * Gets the value of the wording property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    @Basic
    @Column(name = "WORDING", length = 255)
    public String getWording() {
        return wording;
    }

    /**
     * Sets the value of the wording property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setWording(String value) {
        this.wording = value;
    }

    /**
     * Gets the value of the wording2 property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    @Basic
    @Column(name = "WORDING_2", length = 255)
    public String getWording2() {
        return wording2;
    }

    /**
     * Sets the value of the wording2 property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setWording2(String value) {
        this.wording2 = value;
    }

    /**
     * Gets the value of the wording3 property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    @Basic
    @Column(name = "WORDING_3", length = 255)
    public String getWording3() {
        return wording3;
    }

    /**
     * Sets the value of the wording3 property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setWording3(String value) {
        this.wording3 = value;
    }

    /**
     * Gets the value of the wording4 property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    @Basic
    @Column(name = "WORDING_4", length = 255)
    public String getWording4() {
        return wording4;
    }

    /**
     * Sets the value of the wording4 property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setWording4(String value) {
        this.wording4 = value;
    }

    /**
     * Gets the value of the committee property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    @Basic
    @Column(name = "COMMITTEE", length = 255)
    public String getCommittee() {
        return committee;
    }

    /**
     * Sets the value of the committee property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setCommittee(String value) {
        this.committee = value;
    }

    /**
     * Gets the value of the chamber property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    @Basic
    @Column(name = "CHAMBER", length = 255)
    public String getChamber() {
        return chamber;
    }

    /**
     * Sets the value of the chamber property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setChamber(String value) {
        this.chamber = value;
    }

    /**
     * Gets the value of the processedIn property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    @Basic
    @Column(name = "PROCESSED_IN", length = 255)
    public String getProcessedIn() {
        return processedIn;
    }

    /**
     * Sets the value of the processedIn property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setProcessedIn(String value) {
        this.processedIn = value;
    }

    /**
     * Gets the value of the decisionType property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    @Basic
    @Column(name = "DECISION_TYPE", length = 255)
    public String getDecisionType() {
        return decisionType;
    }

    /**
     * Sets the value of the decisionType property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setDecisionType(String value) {
        this.decisionType = value;
    }

    public DocumentProposalData withProposalNumber(int value) {
        setProposalNumber(value);
        return this;
    }

    public DocumentProposalData withDesignation(int value) {
        setDesignation(value);
        return this;
    }

    public DocumentProposalData withWording(String value) {
        setWording(value);
        return this;
    }

    public DocumentProposalData withWording2(String value) {
        setWording2(value);
        return this;
    }

    public DocumentProposalData withWording3(String value) {
        setWording3(value);
        return this;
    }

    public DocumentProposalData withWording4(String value) {
        setWording4(value);
        return this;
    }

    public DocumentProposalData withCommittee(String value) {
        setCommittee(value);
        return this;
    }

    public DocumentProposalData withChamber(String value) {
        setChamber(value);
        return this;
    }

    public DocumentProposalData withProcessedIn(String value) {
        setProcessedIn(value);
        return this;
    }

    public DocumentProposalData withDecisionType(String value) {
        setDecisionType(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) {
        {
            int theProposalNumber;
            theProposalNumber = this.getProposalNumber();
            strategy.appendField(locator, this, "proposalNumber", buffer, theProposalNumber);
        }
        {
            int theDesignation;
            theDesignation = this.getDesignation();
            strategy.appendField(locator, this, "designation", buffer, theDesignation);
        }
        {
            String theWording;
            theWording = this.getWording();
            strategy.appendField(locator, this, "wording", buffer, theWording);
        }
        {
            String theWording2;
            theWording2 = this.getWording2();
            strategy.appendField(locator, this, "wording2", buffer, theWording2);
        }
        {
            String theWording3;
            theWording3 = this.getWording3();
            strategy.appendField(locator, this, "wording3", buffer, theWording3);
        }
        {
            String theWording4;
            theWording4 = this.getWording4();
            strategy.appendField(locator, this, "wording4", buffer, theWording4);
        }
        {
            String theCommittee;
            theCommittee = this.getCommittee();
            strategy.appendField(locator, this, "committee", buffer, theCommittee);
        }
        {
            String theChamber;
            theChamber = this.getChamber();
            strategy.appendField(locator, this, "chamber", buffer, theChamber);
        }
        {
            String theProcessedIn;
            theProcessedIn = this.getProcessedIn();
            strategy.appendField(locator, this, "processedIn", buffer, theProcessedIn);
        }
        {
            String theDecisionType;
            theDecisionType = this.getDecisionType();
            strategy.appendField(locator, this, "decisionType", buffer, theDecisionType);
        }
        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 DocumentProposalData that = ((DocumentProposalData) object);
        {
            int lhsProposalNumber;
            lhsProposalNumber = this.getProposalNumber();
            int rhsProposalNumber;
            rhsProposalNumber = that.getProposalNumber();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "proposalNumber", lhsProposalNumber), LocatorUtils.property(thatLocator, "proposalNumber", rhsProposalNumber), lhsProposalNumber, rhsProposalNumber)) {
                return false;
            }
        }
        {
            int lhsDesignation;
            lhsDesignation = this.getDesignation();
            int rhsDesignation;
            rhsDesignation = that.getDesignation();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "designation", lhsDesignation), LocatorUtils.property(thatLocator, "designation", rhsDesignation), lhsDesignation, rhsDesignation)) {
                return false;
            }
        }
        {
            String lhsWording;
            lhsWording = this.getWording();
            String rhsWording;
            rhsWording = that.getWording();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "wording", lhsWording), LocatorUtils.property(thatLocator, "wording", rhsWording), lhsWording, rhsWording)) {
                return false;
            }
        }
        {
            String lhsWording2;
            lhsWording2 = this.getWording2();
            String rhsWording2;
            rhsWording2 = that.getWording2();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "wording2", lhsWording2), LocatorUtils.property(thatLocator, "wording2", rhsWording2), lhsWording2, rhsWording2)) {
                return false;
            }
        }
        {
            String lhsWording3;
            lhsWording3 = this.getWording3();
            String rhsWording3;
            rhsWording3 = that.getWording3();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "wording3", lhsWording3), LocatorUtils.property(thatLocator, "wording3", rhsWording3), lhsWording3, rhsWording3)) {
                return false;
            }
        }
        {
            String lhsWording4;
            lhsWording4 = this.getWording4();
            String rhsWording4;
            rhsWording4 = that.getWording4();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "wording4", lhsWording4), LocatorUtils.property(thatLocator, "wording4", rhsWording4), lhsWording4, rhsWording4)) {
                return false;
            }
        }
        {
            String lhsCommittee;
            lhsCommittee = this.getCommittee();
            String rhsCommittee;
            rhsCommittee = that.getCommittee();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "committee", lhsCommittee), LocatorUtils.property(thatLocator, "committee", rhsCommittee), lhsCommittee, rhsCommittee)) {
                return false;
            }
        }
        {
            String lhsChamber;
            lhsChamber = this.getChamber();
            String rhsChamber;
            rhsChamber = that.getChamber();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "chamber", lhsChamber), LocatorUtils.property(thatLocator, "chamber", rhsChamber), lhsChamber, rhsChamber)) {
                return false;
            }
        }
        {
            String lhsProcessedIn;
            lhsProcessedIn = this.getProcessedIn();
            String rhsProcessedIn;
            rhsProcessedIn = that.getProcessedIn();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "processedIn", lhsProcessedIn), LocatorUtils.property(thatLocator, "processedIn", rhsProcessedIn), lhsProcessedIn, rhsProcessedIn)) {
                return false;
            }
        }
        {
            String lhsDecisionType;
            lhsDecisionType = this.getDecisionType();
            String rhsDecisionType;
            rhsDecisionType = that.getDecisionType();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "decisionType", lhsDecisionType), LocatorUtils.property(thatLocator, "decisionType", rhsDecisionType), lhsDecisionType, rhsDecisionType)) {
                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;
        {
            int theProposalNumber;
            theProposalNumber = this.getProposalNumber();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "proposalNumber", theProposalNumber), currentHashCode, theProposalNumber);
        }
        {
            int theDesignation;
            theDesignation = this.getDesignation();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "designation", theDesignation), currentHashCode, theDesignation);
        }
        {
            String theWording;
            theWording = this.getWording();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "wording", theWording), currentHashCode, theWording);
        }
        {
            String theWording2;
            theWording2 = this.getWording2();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "wording2", theWording2), currentHashCode, theWording2);
        }
        {
            String theWording3;
            theWording3 = this.getWording3();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "wording3", theWording3), currentHashCode, theWording3);
        }
        {
            String theWording4;
            theWording4 = this.getWording4();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "wording4", theWording4), currentHashCode, theWording4);
        }
        {
            String theCommittee;
            theCommittee = this.getCommittee();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "committee", theCommittee), currentHashCode, theCommittee);
        }
        {
            String theChamber;
            theChamber = this.getChamber();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "chamber", theChamber), currentHashCode, theChamber);
        }
        {
            String theProcessedIn;
            theProcessedIn = this.getProcessedIn();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "processedIn", theProcessedIn), currentHashCode, theProcessedIn);
        }
        {
            String theDecisionType;
            theDecisionType = this.getDecisionType();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "decisionType", theDecisionType), currentHashCode, theDecisionType);
        }
        return currentHashCode;
    }

    public int hashCode() {
        final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
        return this.hashCode(null, strategy);
    }

}