/* * Geotoolkit - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2008 - 2011, Geomatys * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotoolkit.ogc.xml.v200; import java.util.Objects; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; import org.geotoolkit.util.Utilities; /** * <p>Java class for AbstractQueryExpressionType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="AbstractQueryExpressionType"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <attribute name="handle" type="{http://www.w3.org/2001/XMLSchema}string" /> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AbstractQueryExpressionType") @XmlSeeAlso({ AbstractAdhocQueryExpressionType.class //StoredQueryType.class }) public abstract class AbstractQueryExpressionType { @XmlAttribute private String handle; public AbstractQueryExpressionType() { } public AbstractQueryExpressionType(final String handle) { this.handle = handle; } public AbstractQueryExpressionType(final AbstractQueryExpressionType that) { if (that != null) { this.handle = that.handle; } } /** * Gets the value of the handle property. * * @return * possible object is * {@link String } * */ public String getHandle() { return handle; } /** * Sets the value of the handle property. * * @param value * allowed object is * {@link String } * */ public void setHandle(String value) { this.handle = value; } /** * Verify if this entry is identical to specified object. */ @Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof AbstractQueryExpressionType) { final AbstractQueryExpressionType that = (AbstractQueryExpressionType) object; return Objects.equals(this.handle, that.handle); } return false; } @Override public int hashCode() { int hash = 5; hash = 37 * hash + (this.handle != null ? this.handle.hashCode() : 0); return hash; } @Override public String toString() { StringBuilder s = new StringBuilder("[").append(this.getClass().getName()).append("]\n"); if(handle != null) { s.append("handle:").append(handle).append('\n'); } return s.toString(); } }