DocumentStatusContainer.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.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 DocumentStatusContainer complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="DocumentStatusContainer">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="dokument" type="{http://dokumentstatus.riksdagen.external.model.cia.hack23.com/impl}DocumentData"/>
* <element name="dokforslag" type="{http://dokumentstatus.riksdagen.external.model.cia.hack23.com/impl}DocumentProposalContainer"/>
* <element name="dokaktivitet" type="{http://dokumentstatus.riksdagen.external.model.cia.hack23.com/impl}DocumentActivityContainer"/>
* <element name="dokuppgift" type="{http://dokumentstatus.riksdagen.external.model.cia.hack23.com/impl}DocumentDetailContainer"/>
* <element name="dokbilaga" type="{http://dokumentstatus.riksdagen.external.model.cia.hack23.com/impl}DocumentAttachmentContainer"/>
* <element name="dokreferens" type="{http://dokumentstatus.riksdagen.external.model.cia.hack23.com/impl}DocumentReferenceContainer"/>
* <element name="dokintressent" type="{http://dokumentstatus.riksdagen.external.model.cia.hack23.com/impl}DocumentPersonReferenceContainer"/>
* <element name="dokkategori" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DocumentStatusContainer", propOrder = {
"document",
"documentProposal",
"documentActivityContainer",
"documentDetailContainer",
"documentAttachmentContainer",
"documentReferenceContainer",
"documentPersonReferenceContainer",
"documentCategory"
})
@Entity(name = "DocumentStatusContainer")
@Table(name = "DOCUMENT_STATUS_CONTAINER")
@Inheritance(strategy = InheritanceType.JOINED)
public class DocumentStatusContainer
implements Serializable, ModelObject, Equals, HashCode, ToString
{
@XmlElement(name = "dokument", required = true)
protected DocumentData document;
@XmlElement(name = "dokforslag", required = true)
protected DocumentProposalContainer documentProposal;
@XmlElement(name = "dokaktivitet", required = true)
protected DocumentActivityContainer documentActivityContainer;
@XmlElement(name = "dokuppgift", required = true)
protected DocumentDetailContainer documentDetailContainer;
@XmlElement(name = "dokbilaga", required = true)
protected DocumentAttachmentContainer documentAttachmentContainer;
@XmlElement(name = "dokreferens", required = true)
protected DocumentReferenceContainer documentReferenceContainer;
@XmlElement(name = "dokintressent", required = true)
protected DocumentPersonReferenceContainer documentPersonReferenceContainer;
@XmlElement(name = "dokkategori", required = true)
protected String documentCategory;
@XmlAttribute(name = "Hjid")
protected Long hjid;
/**
* Gets the value of the document property.
*
* @return
* possible object is
* {@link DocumentData }
*
*/
@ManyToOne(targetEntity = DocumentData.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "DOCUMENT_DOCUMENT_STATUS_CON_0")
public DocumentData getDocument() {
return document;
}
/**
* Sets the value of the document property.
*
* @param value
* allowed object is
* {@link DocumentData }
*
*/
public void setDocument(DocumentData value) {
this.document = value;
}
/**
* Gets the value of the documentProposal property.
*
* @return
* possible object is
* {@link DocumentProposalContainer }
*
*/
@ManyToOne(targetEntity = DocumentProposalContainer.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "DOCUMENT_PROPOSAL_DOCUMENT_S_0")
public DocumentProposalContainer getDocumentProposal() {
return documentProposal;
}
/**
* Sets the value of the documentProposal property.
*
* @param value
* allowed object is
* {@link DocumentProposalContainer }
*
*/
public void setDocumentProposal(DocumentProposalContainer value) {
this.documentProposal = value;
}
/**
* Gets the value of the documentActivityContainer property.
*
* @return
* possible object is
* {@link DocumentActivityContainer }
*
*/
@ManyToOne(targetEntity = DocumentActivityContainer.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "DOCUMENT_ACTIVITY_CONTAINER__0")
public DocumentActivityContainer getDocumentActivityContainer() {
return documentActivityContainer;
}
/**
* Sets the value of the documentActivityContainer property.
*
* @param value
* allowed object is
* {@link DocumentActivityContainer }
*
*/
public void setDocumentActivityContainer(DocumentActivityContainer value) {
this.documentActivityContainer = value;
}
/**
* Gets the value of the documentDetailContainer property.
*
* @return
* possible object is
* {@link DocumentDetailContainer }
*
*/
@ManyToOne(targetEntity = DocumentDetailContainer.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "DOCUMENT_DETAIL_CONTAINER_DO_0")
public DocumentDetailContainer getDocumentDetailContainer() {
return documentDetailContainer;
}
/**
* Sets the value of the documentDetailContainer property.
*
* @param value
* allowed object is
* {@link DocumentDetailContainer }
*
*/
public void setDocumentDetailContainer(DocumentDetailContainer value) {
this.documentDetailContainer = value;
}
/**
* Gets the value of the documentAttachmentContainer property.
*
* @return
* possible object is
* {@link DocumentAttachmentContainer }
*
*/
@ManyToOne(targetEntity = DocumentAttachmentContainer.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "DOCUMENT_ATTACHMENT_CONTAINE_0")
public DocumentAttachmentContainer getDocumentAttachmentContainer() {
return documentAttachmentContainer;
}
/**
* Sets the value of the documentAttachmentContainer property.
*
* @param value
* allowed object is
* {@link DocumentAttachmentContainer }
*
*/
public void setDocumentAttachmentContainer(DocumentAttachmentContainer value) {
this.documentAttachmentContainer = value;
}
/**
* Gets the value of the documentReferenceContainer property.
*
* @return
* possible object is
* {@link DocumentReferenceContainer }
*
*/
@ManyToOne(targetEntity = DocumentReferenceContainer.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "DOCUMENT_REFERENCE_CONTAINER_0")
public DocumentReferenceContainer getDocumentReferenceContainer() {
return documentReferenceContainer;
}
/**
* Sets the value of the documentReferenceContainer property.
*
* @param value
* allowed object is
* {@link DocumentReferenceContainer }
*
*/
public void setDocumentReferenceContainer(DocumentReferenceContainer value) {
this.documentReferenceContainer = value;
}
/**
* Gets the value of the documentPersonReferenceContainer property.
*
* @return
* possible object is
* {@link DocumentPersonReferenceContainer }
*
*/
@ManyToOne(targetEntity = DocumentPersonReferenceContainer.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "DOCUMENT_PERSON_REFERENCE_CO_1")
public DocumentPersonReferenceContainer getDocumentPersonReferenceContainer() {
return documentPersonReferenceContainer;
}
/**
* Sets the value of the documentPersonReferenceContainer property.
*
* @param value
* allowed object is
* {@link DocumentPersonReferenceContainer }
*
*/
public void setDocumentPersonReferenceContainer(DocumentPersonReferenceContainer value) {
this.documentPersonReferenceContainer = value;
}
/**
* Gets the value of the documentCategory property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "DOCUMENT_CATEGORY", length = 255)
public String getDocumentCategory() {
return documentCategory;
}
/**
* Sets the value of the documentCategory property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDocumentCategory(String value) {
this.documentCategory = value;
}
public DocumentStatusContainer withDocument(DocumentData value) {
setDocument(value);
return this;
}
public DocumentStatusContainer withDocumentProposal(DocumentProposalContainer value) {
setDocumentProposal(value);
return this;
}
public DocumentStatusContainer withDocumentActivityContainer(DocumentActivityContainer value) {
setDocumentActivityContainer(value);
return this;
}
public DocumentStatusContainer withDocumentDetailContainer(DocumentDetailContainer value) {
setDocumentDetailContainer(value);
return this;
}
public DocumentStatusContainer withDocumentAttachmentContainer(DocumentAttachmentContainer value) {
setDocumentAttachmentContainer(value);
return this;
}
public DocumentStatusContainer withDocumentReferenceContainer(DocumentReferenceContainer value) {
setDocumentReferenceContainer(value);
return this;
}
public DocumentStatusContainer withDocumentPersonReferenceContainer(DocumentPersonReferenceContainer value) {
setDocumentPersonReferenceContainer(value);
return this;
}
public DocumentStatusContainer withDocumentCategory(String value) {
setDocumentCategory(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) {
{
DocumentData theDocument;
theDocument = this.getDocument();
strategy.appendField(locator, this, "document", buffer, theDocument);
}
{
DocumentProposalContainer theDocumentProposal;
theDocumentProposal = this.getDocumentProposal();
strategy.appendField(locator, this, "documentProposal", buffer, theDocumentProposal);
}
{
DocumentActivityContainer theDocumentActivityContainer;
theDocumentActivityContainer = this.getDocumentActivityContainer();
strategy.appendField(locator, this, "documentActivityContainer", buffer, theDocumentActivityContainer);
}
{
DocumentDetailContainer theDocumentDetailContainer;
theDocumentDetailContainer = this.getDocumentDetailContainer();
strategy.appendField(locator, this, "documentDetailContainer", buffer, theDocumentDetailContainer);
}
{
DocumentAttachmentContainer theDocumentAttachmentContainer;
theDocumentAttachmentContainer = this.getDocumentAttachmentContainer();
strategy.appendField(locator, this, "documentAttachmentContainer", buffer, theDocumentAttachmentContainer);
}
{
DocumentReferenceContainer theDocumentReferenceContainer;
theDocumentReferenceContainer = this.getDocumentReferenceContainer();
strategy.appendField(locator, this, "documentReferenceContainer", buffer, theDocumentReferenceContainer);
}
{
DocumentPersonReferenceContainer theDocumentPersonReferenceContainer;
theDocumentPersonReferenceContainer = this.getDocumentPersonReferenceContainer();
strategy.appendField(locator, this, "documentPersonReferenceContainer", buffer, theDocumentPersonReferenceContainer);
}
{
String theDocumentCategory;
theDocumentCategory = this.getDocumentCategory();
strategy.appendField(locator, this, "documentCategory", buffer, theDocumentCategory);
}
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 DocumentStatusContainer that = ((DocumentStatusContainer) object);
{
DocumentData lhsDocument;
lhsDocument = this.getDocument();
DocumentData rhsDocument;
rhsDocument = that.getDocument();
if (!strategy.equals(LocatorUtils.property(thisLocator, "document", lhsDocument), LocatorUtils.property(thatLocator, "document", rhsDocument), lhsDocument, rhsDocument)) {
return false;
}
}
{
DocumentProposalContainer lhsDocumentProposal;
lhsDocumentProposal = this.getDocumentProposal();
DocumentProposalContainer rhsDocumentProposal;
rhsDocumentProposal = that.getDocumentProposal();
if (!strategy.equals(LocatorUtils.property(thisLocator, "documentProposal", lhsDocumentProposal), LocatorUtils.property(thatLocator, "documentProposal", rhsDocumentProposal), lhsDocumentProposal, rhsDocumentProposal)) {
return false;
}
}
{
DocumentActivityContainer lhsDocumentActivityContainer;
lhsDocumentActivityContainer = this.getDocumentActivityContainer();
DocumentActivityContainer rhsDocumentActivityContainer;
rhsDocumentActivityContainer = that.getDocumentActivityContainer();
if (!strategy.equals(LocatorUtils.property(thisLocator, "documentActivityContainer", lhsDocumentActivityContainer), LocatorUtils.property(thatLocator, "documentActivityContainer", rhsDocumentActivityContainer), lhsDocumentActivityContainer, rhsDocumentActivityContainer)) {
return false;
}
}
{
DocumentDetailContainer lhsDocumentDetailContainer;
lhsDocumentDetailContainer = this.getDocumentDetailContainer();
DocumentDetailContainer rhsDocumentDetailContainer;
rhsDocumentDetailContainer = that.getDocumentDetailContainer();
if (!strategy.equals(LocatorUtils.property(thisLocator, "documentDetailContainer", lhsDocumentDetailContainer), LocatorUtils.property(thatLocator, "documentDetailContainer", rhsDocumentDetailContainer), lhsDocumentDetailContainer, rhsDocumentDetailContainer)) {
return false;
}
}
{
DocumentAttachmentContainer lhsDocumentAttachmentContainer;
lhsDocumentAttachmentContainer = this.getDocumentAttachmentContainer();
DocumentAttachmentContainer rhsDocumentAttachmentContainer;
rhsDocumentAttachmentContainer = that.getDocumentAttachmentContainer();
if (!strategy.equals(LocatorUtils.property(thisLocator, "documentAttachmentContainer", lhsDocumentAttachmentContainer), LocatorUtils.property(thatLocator, "documentAttachmentContainer", rhsDocumentAttachmentContainer), lhsDocumentAttachmentContainer, rhsDocumentAttachmentContainer)) {
return false;
}
}
{
DocumentReferenceContainer lhsDocumentReferenceContainer;
lhsDocumentReferenceContainer = this.getDocumentReferenceContainer();
DocumentReferenceContainer rhsDocumentReferenceContainer;
rhsDocumentReferenceContainer = that.getDocumentReferenceContainer();
if (!strategy.equals(LocatorUtils.property(thisLocator, "documentReferenceContainer", lhsDocumentReferenceContainer), LocatorUtils.property(thatLocator, "documentReferenceContainer", rhsDocumentReferenceContainer), lhsDocumentReferenceContainer, rhsDocumentReferenceContainer)) {
return false;
}
}
{
DocumentPersonReferenceContainer lhsDocumentPersonReferenceContainer;
lhsDocumentPersonReferenceContainer = this.getDocumentPersonReferenceContainer();
DocumentPersonReferenceContainer rhsDocumentPersonReferenceContainer;
rhsDocumentPersonReferenceContainer = that.getDocumentPersonReferenceContainer();
if (!strategy.equals(LocatorUtils.property(thisLocator, "documentPersonReferenceContainer", lhsDocumentPersonReferenceContainer), LocatorUtils.property(thatLocator, "documentPersonReferenceContainer", rhsDocumentPersonReferenceContainer), lhsDocumentPersonReferenceContainer, rhsDocumentPersonReferenceContainer)) {
return false;
}
}
{
String lhsDocumentCategory;
lhsDocumentCategory = this.getDocumentCategory();
String rhsDocumentCategory;
rhsDocumentCategory = that.getDocumentCategory();
if (!strategy.equals(LocatorUtils.property(thisLocator, "documentCategory", lhsDocumentCategory), LocatorUtils.property(thatLocator, "documentCategory", rhsDocumentCategory), lhsDocumentCategory, rhsDocumentCategory)) {
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;
{
DocumentData theDocument;
theDocument = this.getDocument();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "document", theDocument), currentHashCode, theDocument);
}
{
DocumentProposalContainer theDocumentProposal;
theDocumentProposal = this.getDocumentProposal();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentProposal", theDocumentProposal), currentHashCode, theDocumentProposal);
}
{
DocumentActivityContainer theDocumentActivityContainer;
theDocumentActivityContainer = this.getDocumentActivityContainer();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentActivityContainer", theDocumentActivityContainer), currentHashCode, theDocumentActivityContainer);
}
{
DocumentDetailContainer theDocumentDetailContainer;
theDocumentDetailContainer = this.getDocumentDetailContainer();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentDetailContainer", theDocumentDetailContainer), currentHashCode, theDocumentDetailContainer);
}
{
DocumentAttachmentContainer theDocumentAttachmentContainer;
theDocumentAttachmentContainer = this.getDocumentAttachmentContainer();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentAttachmentContainer", theDocumentAttachmentContainer), currentHashCode, theDocumentAttachmentContainer);
}
{
DocumentReferenceContainer theDocumentReferenceContainer;
theDocumentReferenceContainer = this.getDocumentReferenceContainer();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentReferenceContainer", theDocumentReferenceContainer), currentHashCode, theDocumentReferenceContainer);
}
{
DocumentPersonReferenceContainer theDocumentPersonReferenceContainer;
theDocumentPersonReferenceContainer = this.getDocumentPersonReferenceContainer();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentPersonReferenceContainer", theDocumentPersonReferenceContainer), currentHashCode, theDocumentPersonReferenceContainer);
}
{
String theDocumentCategory;
theDocumentCategory = this.getDocumentCategory();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentCategory", theDocumentCategory), currentHashCode, theDocumentCategory);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}