www.pudn.com > google_examples.zip > GoogleSearchResult.java, change:2002-05-01,size:7448b


/** 
 * GoogleSearchResult.java 
 * 
 * This file was auto-generated from WSDL 
 * by the Apache Axis Wsdl2java emitter. 
 */ 
 
package GoogleSearch; 
 
public class GoogleSearchResult implements java.io.Serializable { 
    private boolean documentFiltering; 
    private java.lang.String searchComments; 
    private int estimatedTotalResultsCount; 
    private boolean estimateIsExact; 
    private GoogleSearch.ResultElement[] resultElements; 
    private java.lang.String searchQuery; 
    private int startIndex; 
    private int endIndex; 
    private java.lang.String searchTips; 
    private GoogleSearch.DirectoryCategory[] directoryCategories; 
    private double searchTime; 
 
    public GoogleSearchResult() { 
    } 
 
    public boolean isDocumentFiltering() { 
        return documentFiltering; 
    } 
 
    public void setDocumentFiltering(boolean documentFiltering) { 
        this.documentFiltering = documentFiltering; 
    } 
 
    public java.lang.String getSearchComments() { 
        return searchComments; 
    } 
 
    public void setSearchComments(java.lang.String searchComments) { 
        this.searchComments = searchComments; 
    } 
 
    public int getEstimatedTotalResultsCount() { 
        return estimatedTotalResultsCount; 
    } 
 
    public void setEstimatedTotalResultsCount(int estimatedTotalResultsCount) { 
        this.estimatedTotalResultsCount = estimatedTotalResultsCount; 
    } 
 
    public boolean isEstimateIsExact() { 
        return estimateIsExact; 
    } 
 
    public void setEstimateIsExact(boolean estimateIsExact) { 
        this.estimateIsExact = estimateIsExact; 
    } 
 
    public GoogleSearch.ResultElement[] getResultElements() { 
        return resultElements; 
    } 
 
    public void setResultElements(GoogleSearch.ResultElement[] resultElements) { 
        this.resultElements = resultElements; 
    } 
 
    public java.lang.String getSearchQuery() { 
        return searchQuery; 
    } 
 
    public void setSearchQuery(java.lang.String searchQuery) { 
        this.searchQuery = searchQuery; 
    } 
 
    public int getStartIndex() { 
        return startIndex; 
    } 
 
    public void setStartIndex(int startIndex) { 
        this.startIndex = startIndex; 
    } 
 
    public int getEndIndex() { 
        return endIndex; 
    } 
 
    public void setEndIndex(int endIndex) { 
        this.endIndex = endIndex; 
    } 
 
    public java.lang.String getSearchTips() { 
        return searchTips; 
    } 
 
    public void setSearchTips(java.lang.String searchTips) { 
        this.searchTips = searchTips; 
    } 
 
    public GoogleSearch.DirectoryCategory[] getDirectoryCategories() { 
        return directoryCategories; 
    } 
 
    public void setDirectoryCategories(GoogleSearch.DirectoryCategory[] directoryCategories) { 
        this.directoryCategories = directoryCategories; 
    } 
 
    public double getSearchTime() { 
        return searchTime; 
    } 
 
    public void setSearchTime(double searchTime) { 
        this.searchTime = searchTime; 
    } 
 
    private Object __equalsCalc = null; 
    public synchronized boolean equals(Object obj) { 
        if (!(obj instanceof GoogleSearchResult)) return false; 
        GoogleSearchResult other = (GoogleSearchResult) obj; 
        if (obj == null) return false; 
        if (this == obj) return true; 
        if (__equalsCalc != null) { 
            return (__equalsCalc == obj); 
        } 
        __equalsCalc = obj; 
        boolean _equals; 
        _equals = true &&  
            documentFiltering == other.isDocumentFiltering() && 
            ((searchComments==null && other.getSearchComments()==null) ||  
             (searchComments!=null && 
              searchComments.equals(other.getSearchComments()))) && 
            estimatedTotalResultsCount == other.getEstimatedTotalResultsCount() && 
            estimateIsExact == other.isEstimateIsExact() && 
            ((resultElements==null && other.getResultElements()==null) ||  
             (resultElements!=null && 
              java.util.Arrays.equals(resultElements, other.getResultElements()))) && 
            ((searchQuery==null && other.getSearchQuery()==null) ||  
             (searchQuery!=null && 
              searchQuery.equals(other.getSearchQuery()))) && 
            startIndex == other.getStartIndex() && 
            endIndex == other.getEndIndex() && 
            ((searchTips==null && other.getSearchTips()==null) ||  
             (searchTips!=null && 
              searchTips.equals(other.getSearchTips()))) && 
            ((directoryCategories==null && other.getDirectoryCategories()==null) ||  
             (directoryCategories!=null && 
              java.util.Arrays.equals(directoryCategories, other.getDirectoryCategories()))) && 
            searchTime == other.getSearchTime(); 
        __equalsCalc = null; 
        return _equals; 
    } 
    private boolean __hashCodeCalc = false; 
    public synchronized int hashCode() { 
        if (__hashCodeCalc) { 
            return 0; 
        } 
        __hashCodeCalc = true; 
        int _hashCode = 1; 
        _hashCode += new Boolean(isDocumentFiltering()).hashCode(); 
        if (getSearchComments() != null) { 
            _hashCode += getSearchComments().hashCode(); 
        } 
        _hashCode += getEstimatedTotalResultsCount(); 
        _hashCode += new Boolean(isEstimateIsExact()).hashCode(); 
        if (getResultElements() != null) { 
            for (int i=0; 
                 i<java.lang.reflect.Array.getLength(getResultElements()); 
                 i++) { 
                Object obj = java.lang.reflect.Array.get(getResultElements(), i); 
                if (obj != null && 
                    !obj.getClass().isArray()) { 
                    _hashCode += obj.hashCode(); 
                } 
            } 
        } 
        if (getSearchQuery() != null) { 
            _hashCode += getSearchQuery().hashCode(); 
        } 
        _hashCode += getStartIndex(); 
        _hashCode += getEndIndex(); 
        if (getSearchTips() != null) { 
            _hashCode += getSearchTips().hashCode(); 
        } 
        if (getDirectoryCategories() != null) { 
            for (int i=0; 
                 i<java.lang.reflect.Array.getLength(getDirectoryCategories()); 
                 i++) { 
                Object obj = java.lang.reflect.Array.get(getDirectoryCategories(), i); 
                if (obj != null && 
                    !obj.getClass().isArray()) { 
                    _hashCode += obj.hashCode(); 
                } 
            } 
        } 
        _hashCode += new Double(getSearchTime()).hashCode(); 
        __hashCodeCalc = false; 
        return _hashCode; 
    } 
    /** 
     * Get Custom Serializer 
     */ 
    public static org.apache.axis.encoding.Serializer getSerializer( 
           String mechType,  
           Class _javaType,   
           javax.xml.rpc.namespace.QName _xmlType) { 
        return  
          new  org.apache.axis.encoding.ser.BeanSerializer( 
            _javaType, _xmlType,null); 
    }; 
 
    /** 
     * Get Custom Deserializer 
     */ 
    public static org.apache.axis.encoding.Deserializer getDeserializer( 
           String mechType,  
           Class _javaType,   
           javax.xml.rpc.namespace.QName _xmlType) { 
        return  
          new  org.apache.axis.encoding.ser.BeanDeserializer( 
            _javaType, _xmlType,null); 
    }; 
 
}