no.nhn.register.common.WSGenericFault Maven / Gradle / Ivy
package no.nhn.register.common;
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 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 GenericFault complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="GenericFault">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ErrorCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Message" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GenericFault", propOrder = {
"errorCode",
"message"
})
public class WSGenericFault
implements Equals, HashCode
{
@XmlElement(name = "ErrorCode", nillable = true)
protected String errorCode;
@XmlElement(name = "Message", nillable = true)
protected String message;
/**
* Gets the value of the errorCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getErrorCode() {
return errorCode;
}
/**
* Sets the value of the errorCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setErrorCode(String value) {
this.errorCode = value;
}
/**
* Gets the value of the message property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMessage() {
return message;
}
/**
* Sets the value of the message property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMessage(String value) {
this.message = value;
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
String theErrorCode;
theErrorCode = this.getErrorCode();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "errorCode", theErrorCode), currentHashCode, theErrorCode);
}
{
String theMessage;
theMessage = this.getMessage();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "message", theMessage), currentHashCode, theMessage);
}
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 WSGenericFault)) {
return false;
}
if (this == object) {
return true;
}
final WSGenericFault that = ((WSGenericFault) object);
{
String lhsErrorCode;
lhsErrorCode = this.getErrorCode();
String rhsErrorCode;
rhsErrorCode = that.getErrorCode();
if (!strategy.equals(LocatorUtils.property(thisLocator, "errorCode", lhsErrorCode), LocatorUtils.property(thatLocator, "errorCode", rhsErrorCode), lhsErrorCode, rhsErrorCode)) {
return false;
}
}
{
String lhsMessage;
lhsMessage = this.getMessage();
String rhsMessage;
rhsMessage = that.getMessage();
if (!strategy.equals(LocatorUtils.property(thisLocator, "message", lhsMessage), LocatorUtils.property(thatLocator, "message", rhsMessage), lhsMessage, rhsMessage)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public WSGenericFault withErrorCode(String value) {
setErrorCode(value);
return this;
}
public WSGenericFault withMessage(String value) {
setMessage(value);
return this;
}
}