com.endeca.portal.data
Class QueryResults

java.lang.Object
  extended by com.endeca.portal.data.QueryResults

public class QueryResults
extends java.lang.Object

An API-agnostic wrapper of query results. This class doesn't permit any real interaction with the contained results, except for determining which API version the contained results are compatible with and returning those results.

See Also:
DataSource, QueryState

Constructor Summary
QueryResults(com.endeca.mdex.conversation.Results results)
          Construct a QueryResults object with results from the Discovery Service API.
 
Method Summary
 com.endeca.mdex.conversation.Results getDiscoveryServiceResults()
          Get the wrapped discovery service results.
 MDEXState.APIVersion getVersion()
          Get what APIVersion this data source supports.
 boolean isDiscoveryService()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResults

public QueryResults(com.endeca.mdex.conversation.Results results)
Construct a QueryResults object with results from the Discovery Service API.

Parameters:
results - the results to wrap.
Method Detail

getDiscoveryServiceResults

public com.endeca.mdex.conversation.Results getDiscoveryServiceResults()
Get the wrapped discovery service results. Will be null if this instance doesn't wrap discovery service results.

Returns:
the wrapped discovery service results

getVersion

public MDEXState.APIVersion getVersion()
Get what APIVersion this data source supports. For branching portlet code based on API support, we recommend using isDiscoveryService() instead of this method.

Returns:
the APIVersion of this data source.

isDiscoveryService

public boolean isDiscoveryService()
Returns:
true if this instance wraps MDEX 7 Discovery Service results, false otherwise.