org.compass.needle.gigaspaces.service
Class SearchResourceResults

java.lang.Object
  extended by org.compass.needle.gigaspaces.service.SearchResourceResults
All Implemented Interfaces:
Externalizable, Serializable

public class SearchResourceResults
extends Object
implements Externalizable

Holds a list of all the search results.

Author:
kimchy
See Also:
Serialized Form

Constructor Summary
SearchResourceResults()
           
SearchResourceResults(SearchResourceResult[] results, long totalLength)
           
 
Method Summary
 float getHighestScore()
          Returns the highest score amond the returned hits.
 float getLowestScore()
          Returns the lowest score amond the returned hits.
 SearchResourceResult[] getResults()
          Returns the array of the search results.
 long getTotalLength()
          Returns the total length of the hits.
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResourceResults

public SearchResourceResults()

SearchResourceResults

public SearchResourceResults(SearchResourceResult[] results,
                             long totalLength)
Method Detail

getResults

public SearchResourceResult[] getResults()
Returns the array of the search results.


getTotalLength

public long getTotalLength()
Returns the total length of the hits. Note, this is not the length of the array returned, but the total length of all hits found for the query.


getHighestScore

public float getHighestScore()
Returns the highest score amond the returned hits. This simply returns the first result score if there is one.


getLowestScore

public float getLowestScore()
Returns the lowest score amond the returned hits. This simply returns the last result score if there is one.


writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException


Copyright (c) 2004-2008 The Compass Project.