no.nhn.schemas.reg.hprv2.WSAlternativId Maven / Gradle / Ivy
package no.nhn.schemas.reg.hprv2;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import no.nhn.schemas.reg.common.no.WSKode;
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.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for AlternativId complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="AlternativId">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ETag" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Id" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* <element name="Type" type="{http://schemas.nhn.no/reg/Common/no}Kode" minOccurs="0"/>
* <element name="Verdi" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AlternativId", propOrder = {
"eTag",
"id",
"type",
"verdi"
})
public class WSAlternativId
implements Equals, HashCode
{
@XmlElement(name = "ETag", nillable = true)
protected String eTag;
@XmlElement(name = "Id")
protected Integer id;
@XmlElement(name = "Type", nillable = true)
protected WSKode type;
@XmlElement(name = "Verdi", nillable = true)
protected String verdi;
/**
* Gets the value of the eTag property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getETag() {
return eTag;
}
/**
* Sets the value of the eTag property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setETag(String value) {
this.eTag = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setId(Integer value) {
this.id = value;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link WSKode }
*
*/
public WSKode getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link WSKode }
*
*/
public void setType(WSKode value) {
this.type = value;
}
/**
* Gets the value of the verdi property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getVerdi() {
return verdi;
}
/**
* Sets the value of the verdi property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVerdi(String value) {
this.verdi = value;
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
String theETag;
theETag = this.getETag();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "eTag", theETag), currentHashCode, theETag);
}
{
Integer theId;
theId = this.getId();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
}
{
WSKode theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType);
}
{
String theVerdi;
theVerdi = this.getVerdi();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "verdi", theVerdi), currentHashCode, theVerdi);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof WSAlternativId)) {
return false;
}
if (this == object) {
return true;
}
final WSAlternativId that = ((WSAlternativId) object);
{
String lhsETag;
lhsETag = this.getETag();
String rhsETag;
rhsETag = that.getETag();
if (!strategy.equals(LocatorUtils.property(thisLocator, "eTag", lhsETag), LocatorUtils.property(thatLocator, "eTag", rhsETag), lhsETag, rhsETag)) {
return false;
}
}
{
Integer lhsId;
lhsId = this.getId();
Integer rhsId;
rhsId = that.getId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
return false;
}
}
{
WSKode lhsType;
lhsType = this.getType();
WSKode rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) {
return false;
}
}
{
String lhsVerdi;
lhsVerdi = this.getVerdi();
String rhsVerdi;
rhsVerdi = that.getVerdi();
if (!strategy.equals(LocatorUtils.property(thisLocator, "verdi", lhsVerdi), LocatorUtils.property(thatLocator, "verdi", rhsVerdi), lhsVerdi, rhsVerdi)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public WSAlternativId withETag(String value) {
setETag(value);
return this;
}
public WSAlternativId withId(Integer value) {
setId(value);
return this;
}
public WSAlternativId withType(WSKode value) {
setType(value);
return this;
}
public WSAlternativId withVerdi(String value) {
setVerdi(value);
return this;
}
}