DetailElement.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:09 AM CEST
//
package com.hack23.cia.model.external.riksdagen.personlista.impl;
import java.io.Serializable;
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 DetailElement complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="DetailElement">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="intressent_id" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="typ" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="uppgift" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="kod" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DetailElement", propOrder = {
"intressentId",
"detailType",
"detail",
"code"
})
@Entity(name = "DetailElement")
@Table(name = "DETAIL_ELEMENT")
@Inheritance(strategy = InheritanceType.JOINED)
public class DetailElement
implements Serializable, ModelObject, Equals, HashCode, ToString
{
@XmlElement(name = "intressent_id", required = true)
protected String intressentId;
@XmlElement(name = "typ", required = true)
protected String detailType;
@XmlElement(name = "uppgift", required = true)
protected String detail;
@XmlElement(name = "kod", required = true)
protected String code;
@XmlAttribute(name = "Hjid")
protected Long hjid;
/**
* 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 detailType property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "DETAIL_TYPE", length = 255)
public String getDetailType() {
return detailType;
}
/**
* Sets the value of the detailType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDetailType(String value) {
this.detailType = value;
}
/**
* Gets the value of the detail property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "DETAIL", length = 65536)
public String getDetail() {
return detail;
}
/**
* Sets the value of the detail property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDetail(String value) {
this.detail = value;
}
/**
* Gets the value of the code property.
*
* @return
* possible object is
* {@link String }
*
*/
@Basic
@Column(name = "CODE", length = 255)
public String getCode() {
return code;
}
/**
* Sets the value of the code property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCode(String value) {
this.code = value;
}
public DetailElement withIntressentId(String value) {
setIntressentId(value);
return this;
}
public DetailElement withDetailType(String value) {
setDetailType(value);
return this;
}
public DetailElement withDetail(String value) {
setDetail(value);
return this;
}
public DetailElement withCode(String value) {
setCode(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 theIntressentId;
theIntressentId = this.getIntressentId();
strategy.appendField(locator, this, "intressentId", buffer, theIntressentId);
}
{
String theDetailType;
theDetailType = this.getDetailType();
strategy.appendField(locator, this, "detailType", buffer, theDetailType);
}
{
String theDetail;
theDetail = this.getDetail();
strategy.appendField(locator, this, "detail", buffer, theDetail);
}
{
String theCode;
theCode = this.getCode();
strategy.appendField(locator, this, "code", buffer, theCode);
}
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 DetailElement that = ((DetailElement) object);
{
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;
}
}
{
String lhsDetailType;
lhsDetailType = this.getDetailType();
String rhsDetailType;
rhsDetailType = that.getDetailType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "detailType", lhsDetailType), LocatorUtils.property(thatLocator, "detailType", rhsDetailType), lhsDetailType, rhsDetailType)) {
return false;
}
}
{
String lhsDetail;
lhsDetail = this.getDetail();
String rhsDetail;
rhsDetail = that.getDetail();
if (!strategy.equals(LocatorUtils.property(thisLocator, "detail", lhsDetail), LocatorUtils.property(thatLocator, "detail", rhsDetail), lhsDetail, rhsDetail)) {
return false;
}
}
{
String lhsCode;
lhsCode = this.getCode();
String rhsCode;
rhsCode = that.getCode();
if (!strategy.equals(LocatorUtils.property(thisLocator, "code", lhsCode), LocatorUtils.property(thatLocator, "code", rhsCode), lhsCode, rhsCode)) {
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 theIntressentId;
theIntressentId = this.getIntressentId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "intressentId", theIntressentId), currentHashCode, theIntressentId);
}
{
String theDetailType;
theDetailType = this.getDetailType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "detailType", theDetailType), currentHashCode, theDetailType);
}
{
String theDetail;
theDetail = this.getDetail();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "detail", theDetail), currentHashCode, theDetail);
}
{
String theCode;
theCode = this.getCode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "code", theCode), currentHashCode, theCode);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}