/**
 * ResultsetTypeResultsetMetadata.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
 */

package org.ecoinformatics.ecogrid.queryservice.resultset;

public class ResultsetTypeResultsetMetadata  implements java.io.Serializable {
    /* The time the resultset was
     *                                 generated and sent to the client. */
    private java.util.Calendar sendTime;

    /* An integer number indicating
     *                                 the index number of the first record
     * included
     *                                 in this batch of records. */
    private long startRecord;

    /* An integer indicating the
     *                                 index number of the last record included
     * in
     *                                 this batch of records. */
    private long endRecord;

    /* The total count of records
     *                                 that were matched by the query, which
     * may be
     *                                 greater than the number of records
     * returned in
     *                                 this particular request for records. */
    private long recordCount;

    /* The system from which this record
     *                                   was matched, indicating the system
     * from which the
     *                                   record originated.  This is used
     * to provide a unique
     *                                   naming scope for the identifier
     * attribute for the
     *                                   records.  The system and identifier
     * together can be
     *                                   used to uniquely refer to a record. */
    private org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataSystem[] system;

    /* Namespace for the "name" attributes 
     * 																in each returnField record. */
    private org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataNamespace[] namespace;

    /* This element is used to describe returnfields to 
     *                                 reduce the amount of replicated data. */
    private org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataRecordStructure recordStructure;

    public ResultsetTypeResultsetMetadata() {
    }

    public ResultsetTypeResultsetMetadata(
           java.util.Calendar sendTime,
           long startRecord,
           long endRecord,
           long recordCount,
           org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataSystem[] system,
           org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataNamespace[] namespace,
           org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataRecordStructure recordStructure) {
           this.sendTime = sendTime;
           this.startRecord = startRecord;
           this.endRecord = endRecord;
           this.recordCount = recordCount;
           this.system = system;
           this.namespace = namespace;
           this.recordStructure = recordStructure;
    }


    /**
     * Gets the sendTime value for this ResultsetTypeResultsetMetadata.
     * 
     * @return sendTime   * The time the resultset was
     *                                 generated and sent to the client.
     */
    public java.util.Calendar getSendTime() {
        return sendTime;
    }


    /**
     * Sets the sendTime value for this ResultsetTypeResultsetMetadata.
     * 
     * @param sendTime   * The time the resultset was
     *                                 generated and sent to the client.
     */
    public void setSendTime(java.util.Calendar sendTime) {
        this.sendTime = sendTime;
    }


    /**
     * Gets the startRecord value for this ResultsetTypeResultsetMetadata.
     * 
     * @return startRecord   * An integer number indicating
     *                                 the index number of the first record
     * included
     *                                 in this batch of records.
     */
    public long getStartRecord() {
        return startRecord;
    }


    /**
     * Sets the startRecord value for this ResultsetTypeResultsetMetadata.
     * 
     * @param startRecord   * An integer number indicating
     *                                 the index number of the first record
     * included
     *                                 in this batch of records.
     */
    public void setStartRecord(long startRecord) {
        this.startRecord = startRecord;
    }


    /**
     * Gets the endRecord value for this ResultsetTypeResultsetMetadata.
     * 
     * @return endRecord   * An integer indicating the
     *                                 index number of the last record included
     * in
     *                                 this batch of records.
     */
    public long getEndRecord() {
        return endRecord;
    }


    /**
     * Sets the endRecord value for this ResultsetTypeResultsetMetadata.
     * 
     * @param endRecord   * An integer indicating the
     *                                 index number of the last record included
     * in
     *                                 this batch of records.
     */
    public void setEndRecord(long endRecord) {
        this.endRecord = endRecord;
    }


    /**
     * Gets the recordCount value for this ResultsetTypeResultsetMetadata.
     * 
     * @return recordCount   * The total count of records
     *                                 that were matched by the query, which
     * may be
     *                                 greater than the number of records
     * returned in
     *                                 this particular request for records.
     */
    public long getRecordCount() {
        return recordCount;
    }


    /**
     * Sets the recordCount value for this ResultsetTypeResultsetMetadata.
     * 
     * @param recordCount   * The total count of records
     *                                 that were matched by the query, which
     * may be
     *                                 greater than the number of records
     * returned in
     *                                 this particular request for records.
     */
    public void setRecordCount(long recordCount) {
        this.recordCount = recordCount;
    }


    /**
     * Gets the system value for this ResultsetTypeResultsetMetadata.
     * 
     * @return system   * The system from which this record
     *                                   was matched, indicating the system
     * from which the
     *                                   record originated.  This is used
     * to provide a unique
     *                                   naming scope for the identifier
     * attribute for the
     *                                   records.  The system and identifier
     * together can be
     *                                   used to uniquely refer to a record.
     */
    public org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataSystem[] getSystem() {
        return system;
    }


    /**
     * Sets the system value for this ResultsetTypeResultsetMetadata.
     * 
     * @param system   * The system from which this record
     *                                   was matched, indicating the system
     * from which the
     *                                   record originated.  This is used
     * to provide a unique
     *                                   naming scope for the identifier
     * attribute for the
     *                                   records.  The system and identifier
     * together can be
     *                                   used to uniquely refer to a record.
     */
    public void setSystem(org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataSystem[] system) {
        this.system = system;
    }

    public org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataSystem getSystem(int i) {
        return this.system[i];
    }

    public void setSystem(int i, org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataSystem _value) {
        this.system[i] = _value;
    }


    /**
     * Gets the namespace value for this ResultsetTypeResultsetMetadata.
     * 
     * @return namespace   * Namespace for the "name" attributes 
     * 																in each returnField record.
     */
    public org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataNamespace[] getNamespace() {
        return namespace;
    }


    /**
     * Sets the namespace value for this ResultsetTypeResultsetMetadata.
     * 
     * @param namespace   * Namespace for the "name" attributes 
     * 																in each returnField record.
     */
    public void setNamespace(org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataNamespace[] namespace) {
        this.namespace = namespace;
    }

    public org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataNamespace getNamespace(int i) {
        return this.namespace[i];
    }

    public void setNamespace(int i, org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataNamespace _value) {
        this.namespace[i] = _value;
    }


    /**
     * Gets the recordStructure value for this ResultsetTypeResultsetMetadata.
     * 
     * @return recordStructure   * This element is used to describe returnfields to 
     *                                 reduce the amount of replicated data.
     */
    public org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataRecordStructure getRecordStructure() {
        return recordStructure;
    }


    /**
     * Sets the recordStructure value for this ResultsetTypeResultsetMetadata.
     * 
     * @param recordStructure   * This element is used to describe returnfields to 
     *                                 reduce the amount of replicated data.
     */
    public void setRecordStructure(org.ecoinformatics.ecogrid.queryservice.resultset.ResultsetTypeResultsetMetadataRecordStructure recordStructure) {
        this.recordStructure = recordStructure;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof ResultsetTypeResultsetMetadata)) return false;
        ResultsetTypeResultsetMetadata other = (ResultsetTypeResultsetMetadata) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.sendTime==null && other.getSendTime()==null) || 
             (this.sendTime!=null &&
              this.sendTime.equals(other.getSendTime()))) &&
            this.startRecord == other.getStartRecord() &&
            this.endRecord == other.getEndRecord() &&
            this.recordCount == other.getRecordCount() &&
            ((this.system==null && other.getSystem()==null) || 
             (this.system!=null &&
              java.util.Arrays.equals(this.system, other.getSystem()))) &&
            ((this.namespace==null && other.getNamespace()==null) || 
             (this.namespace!=null &&
              java.util.Arrays.equals(this.namespace, other.getNamespace()))) &&
            ((this.recordStructure==null && other.getRecordStructure()==null) || 
             (this.recordStructure!=null &&
              this.recordStructure.equals(other.getRecordStructure())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getSendTime() != null) {
            _hashCode += getSendTime().hashCode();
        }
        _hashCode += new Long(getStartRecord()).hashCode();
        _hashCode += new Long(getEndRecord()).hashCode();
        _hashCode += new Long(getRecordCount()).hashCode();
        if (getSystem() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getSystem());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getSystem(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        if (getNamespace() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getNamespace());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getNamespace(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        if (getRecordStructure() != null) {
            _hashCode += getRecordStructure().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(ResultsetTypeResultsetMetadata.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", ">ResultsetType>resultsetMetadata"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("sendTime");
        elemField.setXmlName(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", "sendTime"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "dateTime"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("startRecord");
        elemField.setXmlName(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", "startRecord"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("endRecord");
        elemField.setXmlName(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", "endRecord"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("recordCount");
        elemField.setXmlName(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", "recordCount"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("system");
        elemField.setXmlName(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", "system"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", ">>ResultsetType>resultsetMetadata>system"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        elemField.setMaxOccursUnbounded(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("namespace");
        elemField.setXmlName(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", "namespace"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", ">>ResultsetType>resultsetMetadata>namespace"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        elemField.setMaxOccursUnbounded(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("recordStructure");
        elemField.setXmlName(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", "recordStructure"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://ecoinformatics.org/resultset-1.0.1", ">>ResultsetType>resultsetMetadata>recordStructure"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}
