io.atlasmap.xml.v2.Restriction Maven / Gradle / Ivy
package io.atlasmap.xml.v2;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* Java class for Restriction complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Restriction">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="type" use="required" type="{http://atlasmap.io/xml/v2}RestrictionType" />
* <attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Restriction")
public class Restriction implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlAttribute(name = "type", required = true)
protected RestrictionType type;
@XmlAttribute(name = "value")
protected String value;
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link RestrictionType }
*
*/
public RestrictionType getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link RestrictionType }
*
*/
public void setType(RestrictionType value) {
this.type = value;
}
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
public boolean equals(Object object) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final Restriction that = ((Restriction) object);
{
RestrictionType leftType;
leftType = this.getType();
RestrictionType rightType;
rightType = that.getType();
if (this.type!= null) {
if (that.type!= null) {
if (!leftType.equals(rightType)) {
return false;
}
} else {
return false;
}
} else {
if (that.type!= null) {
return false;
}
}
}
{
String leftValue;
leftValue = this.getValue();
String rightValue;
rightValue = that.getValue();
if (this.value!= null) {
if (that.value!= null) {
if (!leftValue.equals(rightValue)) {
return false;
}
} else {
return false;
}
} else {
if (that.value!= null) {
return false;
}
}
}
return true;
}
public int hashCode() {
int currentHashCode = 1;
{
currentHashCode = (currentHashCode* 31);
RestrictionType theType;
theType = this.getType();
if (this.type!= null) {
currentHashCode += theType.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theValue;
theValue = this.getValue();
if (this.value!= null) {
currentHashCode += theValue.hashCode();
}
}
return currentHashCode;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy