CommitteeProposalComponentData.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 javax.persistence.CascadeType;
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.JoinColumn;
import javax.persistence.ManyToOne;
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 CommitteeProposalComponentData complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CommitteeProposalComponentData">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="dokmotforslag" type="{http://utskottsforslag.riksdagen.external.model.cia.hack23.com/impl}AgainstProposalContainer" minOccurs="0"/>
* <sequence minOccurs="0">
* <element name="dokument" type="{http://utskottsforslag.riksdagen.external.model.cia.hack23.com/impl}CommitteeDocumentData"/>
* <element name="dokutskottsforslag" type="{http://utskottsforslag.riksdagen.external.model.cia.hack23.com/impl}CommitteeProposalContainer"/>
* </sequence>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CommitteeProposalComponentData", propOrder = {
"againstProposalContainer",
"document",
"committeeProposalContainer"
})
@Entity(name = "CommitteeProposalComponentData")
@Table(name = "COMMITTEE_PROPOSAL_COMPONENT_0")
@Inheritance(strategy = InheritanceType.JOINED)
public class CommitteeProposalComponentData
implements Serializable, ModelObject, Equals, HashCode, ToString
{
@XmlElement(name = "dokmotforslag")
protected AgainstProposalContainer againstProposalContainer;
@XmlElement(name = "dokument")
protected CommitteeDocumentData document;
@XmlElement(name = "dokutskottsforslag")
protected CommitteeProposalContainer committeeProposalContainer;
@XmlAttribute(name = "Hjid")
protected Long hjid;
/**
* Gets the value of the againstProposalContainer property.
*
* @return
* possible object is
* {@link AgainstProposalContainer }
*
*/
@ManyToOne(targetEntity = AgainstProposalContainer.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "AGAINST_PROPOSAL_CONTAINER_C_0")
public AgainstProposalContainer getAgainstProposalContainer() {
return againstProposalContainer;
}
/**
* Sets the value of the againstProposalContainer property.
*
* @param value
* allowed object is
* {@link AgainstProposalContainer }
*
*/
public void setAgainstProposalContainer(AgainstProposalContainer value) {
this.againstProposalContainer = value;
}
/**
* Gets the value of the document property.
*
* @return
* possible object is
* {@link CommitteeDocumentData }
*
*/
@ManyToOne(targetEntity = CommitteeDocumentData.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "DOCUMENT_COMMITTEE_PROPOSAL__0")
public CommitteeDocumentData getDocument() {
return document;
}
/**
* Sets the value of the document property.
*
* @param value
* allowed object is
* {@link CommitteeDocumentData }
*
*/
public void setDocument(CommitteeDocumentData value) {
this.document = value;
}
/**
* Gets the value of the committeeProposalContainer property.
*
* @return
* possible object is
* {@link CommitteeProposalContainer }
*
*/
@ManyToOne(targetEntity = CommitteeProposalContainer.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "COMMITTEE_PROPOSAL_CONTAINER_0")
public CommitteeProposalContainer getCommitteeProposalContainer() {
return committeeProposalContainer;
}
/**
* Sets the value of the committeeProposalContainer property.
*
* @param value
* allowed object is
* {@link CommitteeProposalContainer }
*
*/
public void setCommitteeProposalContainer(CommitteeProposalContainer value) {
this.committeeProposalContainer = value;
}
public CommitteeProposalComponentData withAgainstProposalContainer(AgainstProposalContainer value) {
setAgainstProposalContainer(value);
return this;
}
public CommitteeProposalComponentData withDocument(CommitteeDocumentData value) {
setDocument(value);
return this;
}
public CommitteeProposalComponentData withCommitteeProposalContainer(CommitteeProposalContainer value) {
setCommitteeProposalContainer(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) {
{
AgainstProposalContainer theAgainstProposalContainer;
theAgainstProposalContainer = this.getAgainstProposalContainer();
strategy.appendField(locator, this, "againstProposalContainer", buffer, theAgainstProposalContainer);
}
{
CommitteeDocumentData theDocument;
theDocument = this.getDocument();
strategy.appendField(locator, this, "document", buffer, theDocument);
}
{
CommitteeProposalContainer theCommitteeProposalContainer;
theCommitteeProposalContainer = this.getCommitteeProposalContainer();
strategy.appendField(locator, this, "committeeProposalContainer", buffer, theCommitteeProposalContainer);
}
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 CommitteeProposalComponentData that = ((CommitteeProposalComponentData) object);
{
AgainstProposalContainer lhsAgainstProposalContainer;
lhsAgainstProposalContainer = this.getAgainstProposalContainer();
AgainstProposalContainer rhsAgainstProposalContainer;
rhsAgainstProposalContainer = that.getAgainstProposalContainer();
if (!strategy.equals(LocatorUtils.property(thisLocator, "againstProposalContainer", lhsAgainstProposalContainer), LocatorUtils.property(thatLocator, "againstProposalContainer", rhsAgainstProposalContainer), lhsAgainstProposalContainer, rhsAgainstProposalContainer)) {
return false;
}
}
{
CommitteeDocumentData lhsDocument;
lhsDocument = this.getDocument();
CommitteeDocumentData rhsDocument;
rhsDocument = that.getDocument();
if (!strategy.equals(LocatorUtils.property(thisLocator, "document", lhsDocument), LocatorUtils.property(thatLocator, "document", rhsDocument), lhsDocument, rhsDocument)) {
return false;
}
}
{
CommitteeProposalContainer lhsCommitteeProposalContainer;
lhsCommitteeProposalContainer = this.getCommitteeProposalContainer();
CommitteeProposalContainer rhsCommitteeProposalContainer;
rhsCommitteeProposalContainer = that.getCommitteeProposalContainer();
if (!strategy.equals(LocatorUtils.property(thisLocator, "committeeProposalContainer", lhsCommitteeProposalContainer), LocatorUtils.property(thatLocator, "committeeProposalContainer", rhsCommitteeProposalContainer), lhsCommitteeProposalContainer, rhsCommitteeProposalContainer)) {
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;
{
AgainstProposalContainer theAgainstProposalContainer;
theAgainstProposalContainer = this.getAgainstProposalContainer();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "againstProposalContainer", theAgainstProposalContainer), currentHashCode, theAgainstProposalContainer);
}
{
CommitteeDocumentData theDocument;
theDocument = this.getDocument();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "document", theDocument), currentHashCode, theDocument);
}
{
CommitteeProposalContainer theCommitteeProposalContainer;
theCommitteeProposalContainer = this.getCommitteeProposalContainer();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "committeeProposalContainer", theCommitteeProposalContainer), currentHashCode, theCommitteeProposalContainer);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}