AgainstProposalData.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:58:17 AM CEST
//
package com.hack23.cia.model.external.riksdagen.utskottsforslag.impl;
import java.io.Serializable;
import java.math.BigInteger;
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 AgainstProposalData complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="AgainstProposalData">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="nummer" type="{http://www.w3.org/2001/XMLSchema}integer"/>
* <element name="rubrik" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="typ" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="partier" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="utskottsforslag_punkt" type="{http://www.w3.org/2001/XMLSchema}integer"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AgainstProposalData", propOrder = {
"numberValue",
"header",
"proposalType",
"parties",
"proposalIssueNumber"
})
@Entity(name = "AgainstProposalData")
@Table(name = "AGAINST_PROPOSAL_DATA")
@Inheritance(strategy = InheritanceType.JOINED)
public class AgainstProposalData
implements Serializable, ModelObject, Equals, HashCode, ToString
{
@XmlElement(name = "nummer", required = true)
protected BigInteger numberValue;
@XmlElement(name = "rubrik", required = true)
protected String header;
@XmlElement(name = "typ", required = true)
protected String proposalType;
@XmlElement(name = "partier", required = true)
protected String parties;
@XmlElement(name = "utskottsforslag_punkt", required = true)
protected BigInteger proposalIssueNumber;
@XmlAttribute(name = "Hjid")
protected Long hjid;
/**
* Gets the value of the numberValue property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
@Basic
@Column(name = "NUMBER_VALUE", precision = 20, scale = 0)
public BigInteger getNumberValue() {
return numberValue;
}
/**
* Sets the value of the numberValue property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setNumberValue(BigInteger value) {
this.numberValue = value;
}
/**
* Gets the value of the header property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "HEADER", length = 255)
public String getHeader() {
return header;
}
/**
* Sets the value of the header property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHeader(String value) {
this.header = value;
}
/**
* Gets the value of the proposalType property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "PROPOSAL_TYPE", length = 255)
public String getProposalType() {
return proposalType;
}
/**
* Sets the value of the proposalType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProposalType(String value) {
this.proposalType = value;
}
/**
* Gets the value of the parties property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "PARTIES", length = 255)
public String getParties() {
return parties;
}
/**
* Sets the value of the parties property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setParties(String value) {
this.parties = value;
}
/**
* Gets the value of the proposalIssueNumber property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
@Basic
@Column(name = "PROPOSAL_ISSUE_NUMBER", precision = 20, scale = 0)
public BigInteger getProposalIssueNumber() {
return proposalIssueNumber;
}
/**
* Sets the value of the proposalIssueNumber property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setProposalIssueNumber(BigInteger value) {
this.proposalIssueNumber = value;
}
public AgainstProposalData withNumberValue(BigInteger value) {
setNumberValue(value);
return this;
}
public AgainstProposalData withHeader(String value) {
setHeader(value);
return this;
}
public AgainstProposalData withProposalType(String value) {
setProposalType(value);
return this;
}
public AgainstProposalData withParties(String value) {
setParties(value);
return this;
}
public AgainstProposalData withProposalIssueNumber(BigInteger value) {
setProposalIssueNumber(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) {
{
BigInteger theNumberValue;
theNumberValue = this.getNumberValue();
strategy.appendField(locator, this, "numberValue", buffer, theNumberValue);
}
{
String theHeader;
theHeader = this.getHeader();
strategy.appendField(locator, this, "header", buffer, theHeader);
}
{
String theProposalType;
theProposalType = this.getProposalType();
strategy.appendField(locator, this, "proposalType", buffer, theProposalType);
}
{
String theParties;
theParties = this.getParties();
strategy.appendField(locator, this, "parties", buffer, theParties);
}
{
BigInteger theProposalIssueNumber;
theProposalIssueNumber = this.getProposalIssueNumber();
strategy.appendField(locator, this, "proposalIssueNumber", buffer, theProposalIssueNumber);
}
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 AgainstProposalData that = ((AgainstProposalData) object);
{
BigInteger lhsNumberValue;
lhsNumberValue = this.getNumberValue();
BigInteger rhsNumberValue;
rhsNumberValue = that.getNumberValue();
if (!strategy.equals(LocatorUtils.property(thisLocator, "numberValue", lhsNumberValue), LocatorUtils.property(thatLocator, "numberValue", rhsNumberValue), lhsNumberValue, rhsNumberValue)) {
return false;
}
}
{
String lhsHeader;
lhsHeader = this.getHeader();
String rhsHeader;
rhsHeader = that.getHeader();
if (!strategy.equals(LocatorUtils.property(thisLocator, "header", lhsHeader), LocatorUtils.property(thatLocator, "header", rhsHeader), lhsHeader, rhsHeader)) {
return false;
}
}
{
String lhsProposalType;
lhsProposalType = this.getProposalType();
String rhsProposalType;
rhsProposalType = that.getProposalType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "proposalType", lhsProposalType), LocatorUtils.property(thatLocator, "proposalType", rhsProposalType), lhsProposalType, rhsProposalType)) {
return false;
}
}
{
String lhsParties;
lhsParties = this.getParties();
String rhsParties;
rhsParties = that.getParties();
if (!strategy.equals(LocatorUtils.property(thisLocator, "parties", lhsParties), LocatorUtils.property(thatLocator, "parties", rhsParties), lhsParties, rhsParties)) {
return false;
}
}
{
BigInteger lhsProposalIssueNumber;
lhsProposalIssueNumber = this.getProposalIssueNumber();
BigInteger rhsProposalIssueNumber;
rhsProposalIssueNumber = that.getProposalIssueNumber();
if (!strategy.equals(LocatorUtils.property(thisLocator, "proposalIssueNumber", lhsProposalIssueNumber), LocatorUtils.property(thatLocator, "proposalIssueNumber", rhsProposalIssueNumber), lhsProposalIssueNumber, rhsProposalIssueNumber)) {
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;
{
BigInteger theNumberValue;
theNumberValue = this.getNumberValue();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "numberValue", theNumberValue), currentHashCode, theNumberValue);
}
{
String theHeader;
theHeader = this.getHeader();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "header", theHeader), currentHashCode, theHeader);
}
{
String theProposalType;
theProposalType = this.getProposalType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "proposalType", theProposalType), currentHashCode, theProposalType);
}
{
String theParties;
theParties = this.getParties();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "parties", theParties), currentHashCode, theParties);
}
{
BigInteger theProposalIssueNumber;
theProposalIssueNumber = this.getProposalIssueNumber();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "proposalIssueNumber", theProposalIssueNumber), currentHashCode, theProposalIssueNumber);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}