no.nhn.schemas.reg.hprv2.WSSuspensjonsperiode 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.WSPeriode;
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 Suspensjonsperiode complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Suspensjonsperiode">
* <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="Periode" type="{http://schemas.nhn.no/reg/Common/no}Periode" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Suspensjonsperiode", propOrder = {
"eTag",
"id",
"periode"
})
public class WSSuspensjonsperiode
implements Equals, HashCode
{
@XmlElement(name = "ETag", nillable = true)
protected String eTag;
@XmlElement(name = "Id")
protected Integer id;
@XmlElement(name = "Periode", nillable = true)
protected WSPeriode periode;
/**
* 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 periode property.
*
* @return
* possible object is
* {@link WSPeriode }
*
*/
public WSPeriode getPeriode() {
return periode;
}
/**
* Sets the value of the periode property.
*
* @param value
* allowed object is
* {@link WSPeriode }
*
*/
public void setPeriode(WSPeriode value) {
this.periode = 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);
}
{
WSPeriode thePeriode;
thePeriode = this.getPeriode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "periode", thePeriode), currentHashCode, thePeriode);
}
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 WSSuspensjonsperiode)) {
return false;
}
if (this == object) {
return true;
}
final WSSuspensjonsperiode that = ((WSSuspensjonsperiode) 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;
}
}
{
WSPeriode lhsPeriode;
lhsPeriode = this.getPeriode();
WSPeriode rhsPeriode;
rhsPeriode = that.getPeriode();
if (!strategy.equals(LocatorUtils.property(thisLocator, "periode", lhsPeriode), LocatorUtils.property(thatLocator, "periode", rhsPeriode), lhsPeriode, rhsPeriode)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public WSSuspensjonsperiode withETag(String value) {
setETag(value);
return this;
}
public WSSuspensjonsperiode withId(Integer value) {
setId(value);
return this;
}
public WSSuspensjonsperiode withPeriode(WSPeriode value) {
setPeriode(value);
return this;
}
}