VoteDataEmbeddedId.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:34 AM CEST
//
package com.hack23.cia.model.external.riksdagen.votering.impl;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
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.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 VoteDataEmbeddedId complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="VoteDataEmbeddedId">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="punkt" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="votering_id" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="intressent_id" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="avser" type="{http://votering.riksdagen.external.model.cia.hack23.com/impl}VoteIssueType"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VoteDataEmbeddedId", propOrder = {
"issue",
"ballotId",
"intressentId",
"concern"
})
@Embeddable
public class VoteDataEmbeddedId
implements Serializable, ModelObject, Equals, HashCode, ToString
{
@XmlElement(name = "punkt", required = true)
protected String issue;
@XmlElement(name = "votering_id", required = true)
protected String ballotId;
@XmlElement(name = "intressent_id", required = true)
protected String intressentId;
@XmlElement(name = "avser", required = true)
@XmlSchemaType(name = "string")
protected VoteIssueType concern;
/**
* Gets the value of the issue property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "ISSUE", length = 255)
public String getIssue() {
return issue;
}
/**
* Sets the value of the issue property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIssue(String value) {
this.issue = value;
}
/**
* Gets the value of the ballotId property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "BALLOT_ID", length = 255)
public String getBallotId() {
return ballotId;
}
/**
* Sets the value of the ballotId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBallotId(String value) {
this.ballotId = value;
}
/**
* Gets the value of the intressentId property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "INTRESSENT_ID", length = 255)
public String getIntressentId() {
return intressentId;
}
/**
* Sets the value of the intressentId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIntressentId(String value) {
this.intressentId = value;
}
/**
* Gets the value of the concern property.
*
* @return
* possible object is
* {@link VoteIssueType }
*
*/
@Basic
@Column(name = "CONCERN", length = 255)
@Enumerated(EnumType.STRING)
public VoteIssueType getConcern() {
return concern;
}
/**
* Sets the value of the concern property.
*
* @param value
* allowed object is
* {@link VoteIssueType }
*
*/
public void setConcern(VoteIssueType value) {
this.concern = value;
}
public VoteDataEmbeddedId withIssue(String value) {
setIssue(value);
return this;
}
public VoteDataEmbeddedId withBallotId(String value) {
setBallotId(value);
return this;
}
public VoteDataEmbeddedId withIntressentId(String value) {
setIntressentId(value);
return this;
}
public VoteDataEmbeddedId withConcern(VoteIssueType value) {
setConcern(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 theIssue;
theIssue = this.getIssue();
strategy.appendField(locator, this, "issue", buffer, theIssue);
}
{
String theBallotId;
theBallotId = this.getBallotId();
strategy.appendField(locator, this, "ballotId", buffer, theBallotId);
}
{
String theIntressentId;
theIntressentId = this.getIntressentId();
strategy.appendField(locator, this, "intressentId", buffer, theIntressentId);
}
{
VoteIssueType theConcern;
theConcern = this.getConcern();
strategy.appendField(locator, this, "concern", buffer, theConcern);
}
return buffer;
}
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 VoteDataEmbeddedId that = ((VoteDataEmbeddedId) object);
{
String lhsIssue;
lhsIssue = this.getIssue();
String rhsIssue;
rhsIssue = that.getIssue();
if (!strategy.equals(LocatorUtils.property(thisLocator, "issue", lhsIssue), LocatorUtils.property(thatLocator, "issue", rhsIssue), lhsIssue, rhsIssue)) {
return false;
}
}
{
String lhsBallotId;
lhsBallotId = this.getBallotId();
String rhsBallotId;
rhsBallotId = that.getBallotId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "ballotId", lhsBallotId), LocatorUtils.property(thatLocator, "ballotId", rhsBallotId), lhsBallotId, rhsBallotId)) {
return false;
}
}
{
String lhsIntressentId;
lhsIntressentId = this.getIntressentId();
String rhsIntressentId;
rhsIntressentId = that.getIntressentId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "intressentId", lhsIntressentId), LocatorUtils.property(thatLocator, "intressentId", rhsIntressentId), lhsIntressentId, rhsIntressentId)) {
return false;
}
}
{
VoteIssueType lhsConcern;
lhsConcern = this.getConcern();
VoteIssueType rhsConcern;
rhsConcern = that.getConcern();
if (!strategy.equals(LocatorUtils.property(thisLocator, "concern", lhsConcern), LocatorUtils.property(thatLocator, "concern", rhsConcern), lhsConcern, rhsConcern)) {
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 theIssue;
theIssue = this.getIssue();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "issue", theIssue), currentHashCode, theIssue);
}
{
String theBallotId;
theBallotId = this.getBallotId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "ballotId", theBallotId), currentHashCode, theBallotId);
}
{
String theIntressentId;
theIntressentId = this.getIntressentId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "intressentId", theIntressentId), currentHashCode, theIntressentId);
}
{
VoteIssueType theConcern;
theConcern = this.getConcern();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "concern", theConcern), currentHashCode, theConcern);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}