DocumentContainerElement.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:26 AM CEST
//
package com.hack23.cia.model.external.riksdagen.dokumentlista.impl;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
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.OneToMany;
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.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 DocumentContainerElement complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="DocumentContainerElement">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="dokument" type="{http://dokumentlista.riksdagen.external.model.cia.hack23.com/impl}DocumentElement" maxOccurs="unbounded"/>
* </sequence>
* <attribute name="datum" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="debug" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="nasta_sida" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
* <attribute name="sida" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
* <attribute name="sidor" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
* <attribute name="skapad" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="traff_fran" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
* <attribute name="traff_till" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
* <attribute name="traffar" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
* <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="warning" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DocumentContainerElement", propOrder = {
"dokument"
})
@Entity(name = "DocumentContainerElement")
@Table(name = "DOCUMENT_CONTAINER_ELEMENT")
@Inheritance(strategy = InheritanceType.JOINED)
public class DocumentContainerElement
implements Serializable, ModelObject, Equals, HashCode, ToString
{
@XmlElement(required = true)
protected List<DocumentElement> dokument;
@XmlAttribute(name = "datum", required = true)
protected String datum;
@XmlAttribute(name = "debug", required = true)
protected String debug;
@XmlAttribute(name = "nasta_sida", required = true)
@XmlSchemaType(name = "anyURI")
protected String nextPage;
@XmlAttribute(name = "sida", required = true)
protected BigInteger page;
@XmlAttribute(name = "sidor", required = true)
protected BigInteger totalPages;
@XmlAttribute(name = "skapad", required = true)
protected String created;
@XmlAttribute(name = "traff_fran", required = true)
protected BigInteger hitsFrom;
@XmlAttribute(name = "traff_till", required = true)
protected BigInteger hitsTo;
@XmlAttribute(name = "traffar", required = true)
protected BigInteger hits;
@XmlAttribute(name = "version", required = true)
protected String documentVersion;
@XmlAttribute(name = "warning", required = true)
protected String warning;
@XmlAttribute(name = "Hjid")
protected Long hjid;
/**
* Gets the value of the dokument property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the dokument property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getDokument().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DocumentElement }
*
*
*/
@OneToMany(targetEntity = DocumentElement.class, cascade = {
CascadeType.ALL
})
@JoinColumn(name = "DOKUMENT_DOCUMENT_CONTAINER__0")
public List<DocumentElement> getDokument() {
if (dokument == null) {
dokument = new ArrayList<DocumentElement>();
}
return this.dokument;
}
/**
*
*
*/
public void setDokument(List<DocumentElement> dokument) {
this.dokument = dokument;
}
/**
* Gets the value of the datum property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "DATUM", length = 255)
public String getDatum() {
return datum;
}
/**
* Sets the value of the datum property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDatum(String value) {
this.datum = value;
}
/**
* Gets the value of the debug property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "DEBUG", length = 255)
public String getDebug() {
return debug;
}
/**
* Sets the value of the debug property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDebug(String value) {
this.debug = value;
}
/**
* Gets the value of the nextPage property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "NEXT_PAGE")
public String getNextPage() {
return nextPage;
}
/**
* Sets the value of the nextPage property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNextPage(String value) {
this.nextPage = value;
}
/**
* Gets the value of the page property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
@Basic
@Column(name = "PAGE", precision = 20, scale = 0)
public BigInteger getPage() {
return page;
}
/**
* Sets the value of the page property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setPage(BigInteger value) {
this.page = value;
}
/**
* Gets the value of the totalPages property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
@Basic
@Column(name = "TOTAL_PAGES", precision = 20, scale = 0)
public BigInteger getTotalPages() {
return totalPages;
}
/**
* Sets the value of the totalPages property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setTotalPages(BigInteger value) {
this.totalPages = value;
}
/**
* Gets the value of the created property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "CREATED", length = 255)
public String getCreated() {
return created;
}
/**
* Sets the value of the created property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCreated(String value) {
this.created = value;
}
/**
* Gets the value of the hitsFrom property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
@Basic
@Column(name = "HITS_FROM", precision = 20, scale = 0)
public BigInteger getHitsFrom() {
return hitsFrom;
}
/**
* Sets the value of the hitsFrom property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setHitsFrom(BigInteger value) {
this.hitsFrom = value;
}
/**
* Gets the value of the hitsTo property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
@Basic
@Column(name = "HITS_TO", precision = 20, scale = 0)
public BigInteger getHitsTo() {
return hitsTo;
}
/**
* Sets the value of the hitsTo property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setHitsTo(BigInteger value) {
this.hitsTo = value;
}
/**
* Gets the value of the hits property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
@Basic
@Column(name = "HITS", precision = 20, scale = 0)
public BigInteger getHits() {
return hits;
}
/**
* Sets the value of the hits property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setHits(BigInteger value) {
this.hits = value;
}
/**
* Gets the value of the documentVersion property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "DOCUMENT_VERSION", length = 255)
public String getDocumentVersion() {
return documentVersion;
}
/**
* Sets the value of the documentVersion property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDocumentVersion(String value) {
this.documentVersion = value;
}
/**
* Gets the value of the warning property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "WARNING", length = 255)
public String getWarning() {
return warning;
}
/**
* Sets the value of the warning property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setWarning(String value) {
this.warning = value;
}
public DocumentContainerElement withDokument(DocumentElement... values) {
if (values!= null) {
for (DocumentElement value: values) {
getDokument().add(value);
}
}
return this;
}
public DocumentContainerElement withDokument(Collection<DocumentElement> values) {
if (values!= null) {
getDokument().addAll(values);
}
return this;
}
public DocumentContainerElement withDokument(List<DocumentElement> dokument) {
setDokument(dokument);
return this;
}
public DocumentContainerElement withDatum(String value) {
setDatum(value);
return this;
}
public DocumentContainerElement withDebug(String value) {
setDebug(value);
return this;
}
public DocumentContainerElement withNextPage(String value) {
setNextPage(value);
return this;
}
public DocumentContainerElement withPage(BigInteger value) {
setPage(value);
return this;
}
public DocumentContainerElement withTotalPages(BigInteger value) {
setTotalPages(value);
return this;
}
public DocumentContainerElement withCreated(String value) {
setCreated(value);
return this;
}
public DocumentContainerElement withHitsFrom(BigInteger value) {
setHitsFrom(value);
return this;
}
public DocumentContainerElement withHitsTo(BigInteger value) {
setHitsTo(value);
return this;
}
public DocumentContainerElement withHits(BigInteger value) {
setHits(value);
return this;
}
public DocumentContainerElement withDocumentVersion(String value) {
setDocumentVersion(value);
return this;
}
public DocumentContainerElement withWarning(String value) {
setWarning(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) {
{
List<DocumentElement> theDokument;
theDokument = (((this.dokument!= null)&&(!this.dokument.isEmpty()))?this.getDokument():null);
strategy.appendField(locator, this, "dokument", buffer, theDokument);
}
{
String theDatum;
theDatum = this.getDatum();
strategy.appendField(locator, this, "datum", buffer, theDatum);
}
{
String theDebug;
theDebug = this.getDebug();
strategy.appendField(locator, this, "debug", buffer, theDebug);
}
{
String theNextPage;
theNextPage = this.getNextPage();
strategy.appendField(locator, this, "nextPage", buffer, theNextPage);
}
{
BigInteger thePage;
thePage = this.getPage();
strategy.appendField(locator, this, "page", buffer, thePage);
}
{
BigInteger theTotalPages;
theTotalPages = this.getTotalPages();
strategy.appendField(locator, this, "totalPages", buffer, theTotalPages);
}
{
String theCreated;
theCreated = this.getCreated();
strategy.appendField(locator, this, "created", buffer, theCreated);
}
{
BigInteger theHitsFrom;
theHitsFrom = this.getHitsFrom();
strategy.appendField(locator, this, "hitsFrom", buffer, theHitsFrom);
}
{
BigInteger theHitsTo;
theHitsTo = this.getHitsTo();
strategy.appendField(locator, this, "hitsTo", buffer, theHitsTo);
}
{
BigInteger theHits;
theHits = this.getHits();
strategy.appendField(locator, this, "hits", buffer, theHits);
}
{
String theDocumentVersion;
theDocumentVersion = this.getDocumentVersion();
strategy.appendField(locator, this, "documentVersion", buffer, theDocumentVersion);
}
{
String theWarning;
theWarning = this.getWarning();
strategy.appendField(locator, this, "warning", buffer, theWarning);
}
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 DocumentContainerElement that = ((DocumentContainerElement) object);
{
List<DocumentElement> lhsDokument;
lhsDokument = (((this.dokument!= null)&&(!this.dokument.isEmpty()))?this.getDokument():null);
List<DocumentElement> rhsDokument;
rhsDokument = (((that.dokument!= null)&&(!that.dokument.isEmpty()))?that.getDokument():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "dokument", lhsDokument), LocatorUtils.property(thatLocator, "dokument", rhsDokument), lhsDokument, rhsDokument)) {
return false;
}
}
{
String lhsDatum;
lhsDatum = this.getDatum();
String rhsDatum;
rhsDatum = that.getDatum();
if (!strategy.equals(LocatorUtils.property(thisLocator, "datum", lhsDatum), LocatorUtils.property(thatLocator, "datum", rhsDatum), lhsDatum, rhsDatum)) {
return false;
}
}
{
String lhsDebug;
lhsDebug = this.getDebug();
String rhsDebug;
rhsDebug = that.getDebug();
if (!strategy.equals(LocatorUtils.property(thisLocator, "debug", lhsDebug), LocatorUtils.property(thatLocator, "debug", rhsDebug), lhsDebug, rhsDebug)) {
return false;
}
}
{
String lhsNextPage;
lhsNextPage = this.getNextPage();
String rhsNextPage;
rhsNextPage = that.getNextPage();
if (!strategy.equals(LocatorUtils.property(thisLocator, "nextPage", lhsNextPage), LocatorUtils.property(thatLocator, "nextPage", rhsNextPage), lhsNextPage, rhsNextPage)) {
return false;
}
}
{
BigInteger lhsPage;
lhsPage = this.getPage();
BigInteger rhsPage;
rhsPage = that.getPage();
if (!strategy.equals(LocatorUtils.property(thisLocator, "page", lhsPage), LocatorUtils.property(thatLocator, "page", rhsPage), lhsPage, rhsPage)) {
return false;
}
}
{
BigInteger lhsTotalPages;
lhsTotalPages = this.getTotalPages();
BigInteger rhsTotalPages;
rhsTotalPages = that.getTotalPages();
if (!strategy.equals(LocatorUtils.property(thisLocator, "totalPages", lhsTotalPages), LocatorUtils.property(thatLocator, "totalPages", rhsTotalPages), lhsTotalPages, rhsTotalPages)) {
return false;
}
}
{
String lhsCreated;
lhsCreated = this.getCreated();
String rhsCreated;
rhsCreated = that.getCreated();
if (!strategy.equals(LocatorUtils.property(thisLocator, "created", lhsCreated), LocatorUtils.property(thatLocator, "created", rhsCreated), lhsCreated, rhsCreated)) {
return false;
}
}
{
BigInteger lhsHitsFrom;
lhsHitsFrom = this.getHitsFrom();
BigInteger rhsHitsFrom;
rhsHitsFrom = that.getHitsFrom();
if (!strategy.equals(LocatorUtils.property(thisLocator, "hitsFrom", lhsHitsFrom), LocatorUtils.property(thatLocator, "hitsFrom", rhsHitsFrom), lhsHitsFrom, rhsHitsFrom)) {
return false;
}
}
{
BigInteger lhsHitsTo;
lhsHitsTo = this.getHitsTo();
BigInteger rhsHitsTo;
rhsHitsTo = that.getHitsTo();
if (!strategy.equals(LocatorUtils.property(thisLocator, "hitsTo", lhsHitsTo), LocatorUtils.property(thatLocator, "hitsTo", rhsHitsTo), lhsHitsTo, rhsHitsTo)) {
return false;
}
}
{
BigInteger lhsHits;
lhsHits = this.getHits();
BigInteger rhsHits;
rhsHits = that.getHits();
if (!strategy.equals(LocatorUtils.property(thisLocator, "hits", lhsHits), LocatorUtils.property(thatLocator, "hits", rhsHits), lhsHits, rhsHits)) {
return false;
}
}
{
String lhsDocumentVersion;
lhsDocumentVersion = this.getDocumentVersion();
String rhsDocumentVersion;
rhsDocumentVersion = that.getDocumentVersion();
if (!strategy.equals(LocatorUtils.property(thisLocator, "documentVersion", lhsDocumentVersion), LocatorUtils.property(thatLocator, "documentVersion", rhsDocumentVersion), lhsDocumentVersion, rhsDocumentVersion)) {
return false;
}
}
{
String lhsWarning;
lhsWarning = this.getWarning();
String rhsWarning;
rhsWarning = that.getWarning();
if (!strategy.equals(LocatorUtils.property(thisLocator, "warning", lhsWarning), LocatorUtils.property(thatLocator, "warning", rhsWarning), lhsWarning, rhsWarning)) {
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;
{
List<DocumentElement> theDokument;
theDokument = (((this.dokument!= null)&&(!this.dokument.isEmpty()))?this.getDokument():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "dokument", theDokument), currentHashCode, theDokument);
}
{
String theDatum;
theDatum = this.getDatum();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "datum", theDatum), currentHashCode, theDatum);
}
{
String theDebug;
theDebug = this.getDebug();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "debug", theDebug), currentHashCode, theDebug);
}
{
String theNextPage;
theNextPage = this.getNextPage();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "nextPage", theNextPage), currentHashCode, theNextPage);
}
{
BigInteger thePage;
thePage = this.getPage();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "page", thePage), currentHashCode, thePage);
}
{
BigInteger theTotalPages;
theTotalPages = this.getTotalPages();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "totalPages", theTotalPages), currentHashCode, theTotalPages);
}
{
String theCreated;
theCreated = this.getCreated();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "created", theCreated), currentHashCode, theCreated);
}
{
BigInteger theHitsFrom;
theHitsFrom = this.getHitsFrom();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "hitsFrom", theHitsFrom), currentHashCode, theHitsFrom);
}
{
BigInteger theHitsTo;
theHitsTo = this.getHitsTo();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "hitsTo", theHitsTo), currentHashCode, theHitsTo);
}
{
BigInteger theHits;
theHits = this.getHits();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "hits", theHits), currentHashCode, theHits);
}
{
String theDocumentVersion;
theDocumentVersion = this.getDocumentVersion();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "documentVersion", theDocumentVersion), currentHashCode, theDocumentVersion);
}
{
String theWarning;
theWarning = this.getWarning();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "warning", theWarning), currentHashCode, theWarning);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}