jgd.comapi
Class QueryResultSet

java.lang.Object
  extended by jgd.comapi.QueryResultSet
All Implemented Interfaces:
IJGDResults, Results, ResultsType

public class QueryResultSet
extends java.lang.Object
implements IJGDResults

Class for representing a set of search-results -entries from a GD query

Author:
Arne Solheim (Protector Forsikring ASA - www.protectorforsikring.no)

Nested Class Summary
 
Nested classes/interfaces inherited from interface jgd.jaxb.ResultsType
ResultsType.ResultType
 
Field Summary
private  int availableCount
           
protected  java.lang.Integer count
           
protected  java.util.List<GoogleDesktopIndexable> queryResultItems
           
private  java.lang.String queryString
           
private  int readyState
           
 
Constructor Summary
QueryResultSet()
          Sets the counter and the current set of QueryResultItem(s) both to null
QueryResultSet(int count)
          Sets the current set of QueryResultItem(s) to null
QueryResultSet(java.lang.Integer count)
           
QueryResultSet(java.lang.Integer count, java.util.List<GoogleDesktopIndexable> queryResultItems)
           
 
Method Summary
 int getAvailableCount()
           
 int getCount()
          See the section Result Objects under http://desktop.google.com/queryapi.html#queryex
 java.util.List<GoogleDesktopIndexable> getQueryResultItems()
           
 java.lang.String getQueryString()
           
 int getReadyState()
           
 java.util.List getResult()
          Result of search from document http://desktop.google.com/queryapi.html .
 void setAvailableCount(int availableCount)
           
 void setCount(int value)
           
 void setCount(java.lang.Integer newCount)
          See the section Result Objects under http://desktop.google.com/queryapi.html#queryex
 void setQueryResultItems(java.util.List<GoogleDesktopIndexable> queryResultItems2)
          Should only be used internally during query.execute()
 void setReadyState(int readyState)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

count

protected java.lang.Integer count

queryResultItems

protected java.util.List<GoogleDesktopIndexable> queryResultItems

readyState

private int readyState

availableCount

private int availableCount

queryString

private java.lang.String queryString
Constructor Detail

QueryResultSet

public QueryResultSet()
Sets the counter and the current set of QueryResultItem(s) both to null

See Also:
jgd.comapi.QueryResultSet(Integer,List)

QueryResultSet

public QueryResultSet(int count)
Sets the current set of QueryResultItem(s) to null

See Also:
jgd.comapi.QueryResultSet(Integer,List)

QueryResultSet

public QueryResultSet(java.lang.Integer count)
See Also:
jgd.comapi.QueryResultSet(Integer,List)

QueryResultSet

public QueryResultSet(java.lang.Integer count,
                      java.util.List<GoogleDesktopIndexable> queryResultItems)
See Also:
setCount(Integer), jgd.comapi.QueryResultSet#setQueryResultItems(List)
Method Detail

getCount

public int getCount()
See the section Result Objects under http://desktop.google.com/queryapi.html#queryex

Specified by:
getCount in interface ResultsType

setCount

public void setCount(java.lang.Integer newCount)
See the section Result Objects under http://desktop.google.com/queryapi.html#queryex


getQueryResultItems

public java.util.List<GoogleDesktopIndexable> getQueryResultItems()
Returns:
a List of individial QueryResultItem -queryResultItems which matches the given search-criterias used in Query to produce this QueryResultSet -instance

setQueryResultItems

public void setQueryResultItems(java.util.List<GoogleDesktopIndexable> queryResultItems2)
Should only be used internally during query.execute()

See Also:
QueryCOM.execute()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a String representation of this QueryResultSet -object

getResult

public java.util.List getResult()
Description copied from interface: ResultsType
Result of search from document http://desktop.google.com/queryapi.html . Each "result" may include the following fields, which may appear in any order. Which fields appear will depend on the result type; for example, the "from" entry should only show up in email or chat results. Each tag will contain a value; any tags not containing a value are not shown. Gets the value of the Result property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the Result property.

For example, to add a new item, do as follows:

    getResult().add(newItem);
 

Objects of the following type(s) are allowed in the list ResultsType.ResultType

Specified by:
getResult in interface ResultsType

setCount

public void setCount(int value)

getAvailableCount

public int getAvailableCount()
Specified by:
getAvailableCount in interface IJGDResults

getReadyState

public int getReadyState()
Specified by:
getReadyState in interface IJGDResults

setReadyState

public void setReadyState(int readyState)

setAvailableCount

public void setAvailableCount(int availableCount)

getQueryString

public java.lang.String getQueryString()
Specified by:
getQueryString in interface IJGDResults


Copyright 2007