All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.meridor.perspective.sql.QueryResult Maven / Gradle / Ivy

The newest version!

package org.meridor.perspective.sql;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
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.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;


/**
 * 

Java class for queryResult complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="queryResult">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <all>
 *         <element name="status" type="{urn:sql.perspective.meridor.org}queryStatus"/>
 *         <element name="count" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         <element name="data" type="{urn:sql.perspective.meridor.org}data"/>
 *         <element name="message" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *       </all>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "queryResult", propOrder = { }) @XmlRootElement(name = "queryResult") public class QueryResult implements Serializable, Equals, HashCode, ToString { @XmlElement(required = true) @XmlSchemaType(name = "string") protected QueryStatus status; @XmlElement(defaultValue = "0") protected int count; @XmlElement(required = true) protected Data data; @XmlElement(required = true) protected String message; /** * Gets the value of the status property. * * @return * possible object is * {@link QueryStatus } * */ public QueryStatus getStatus() { return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link QueryStatus } * */ public void setStatus(QueryStatus value) { this.status = value; } /** * Gets the value of the count property. * */ public int getCount() { return count; } /** * Sets the value of the count property. * */ public void setCount(int value) { this.count = value; } /** * Gets the value of the data property. * * @return * possible object is * {@link Data } * */ public Data getData() { return data; } /** * Sets the value of the data property. * * @param value * allowed object is * {@link Data } * */ public void setData(Data value) { this.data = 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 boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof QueryResult)) { return false; } if (this == object) { return true; } final QueryResult that = ((QueryResult) object); { QueryStatus lhsStatus; lhsStatus = this.getStatus(); QueryStatus rhsStatus; rhsStatus = that.getStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus)) { return false; } } { int lhsCount; lhsCount = this.getCount(); int rhsCount; rhsCount = that.getCount(); if (!strategy.equals(LocatorUtils.property(thisLocator, "count", lhsCount), LocatorUtils.property(thatLocator, "count", rhsCount), lhsCount, rhsCount)) { return false; } } { Data lhsData; lhsData = this.getData(); Data rhsData; rhsData = that.getData(); if (!strategy.equals(LocatorUtils.property(thisLocator, "data", lhsData), LocatorUtils.property(thatLocator, "data", rhsData), lhsData, rhsData)) { 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 int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { QueryStatus theStatus; theStatus = this.getStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus); } { int theCount; theCount = this.getCount(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "count", theCount), currentHashCode, theCount); } { Data theData; theData = this.getData(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "data", theData), currentHashCode, theData); } { 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 String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { QueryStatus theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus); } { int theCount; theCount = this.getCount(); strategy.appendField(locator, this, "count", buffer, theCount); } { Data theData; theData = this.getData(); strategy.appendField(locator, this, "data", buffer, theData); } { String theMessage; theMessage = this.getMessage(); strategy.appendField(locator, this, "message", buffer, theMessage); } return buffer; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy