atg.adapter.integrations
Class IntegrationRepositoryView

java.lang.Object
  extended by atg.repository.RepositoryViewImpl
      extended by atg.adapter.integrations.IntegrationRepositoryView
All Implemented Interfaces:
NamedQueryView, RepositoryView, java.io.Serializable

public abstract class IntegrationRepositoryView
extends RepositoryViewImpl
implements java.io.Serializable

A repository view for querying an integrations repository. This must be extended by a class that knows how to create a command input for a given query.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static atg.repository.query.SupportedQueries SUPPORTED_QUERIES
           
 
Fields inherited from class atg.repository.RepositoryViewImpl
mCache, RESOURCE_BUNDLE_NAME
 
Constructor Summary
IntegrationRepositoryView()
           
 
Method Summary
 RepositoryItem[] applyOptions(RepositoryItem[] pItems, QueryOptions pOptions)
          Apply the query options to the given array of items.
abstract  java.lang.Object createQueryCommandInput(Query pQuery, QueryOptions pQueryOptions)
          This method will process the given Query and create the input that will be passed to the query command.
 int executeCountQuery(Query pQuery)
          Executes a query that returns the number of items that would be returned by given query.
 RepositoryItem[] executeQueryCommand(java.lang.Object pInput)
          Execute the given command using the given inputs
 RepositoryItem[] executeUncachedQuery(Query pQuery, QueryOptions pOptions)
          Query the item using the item descriptor
 QueryBuilder getQueryBuilder()
          Returns a QueryBuilder to use for creating Query objects
protected  RepositoryItem[] processResults(Command pCommand, CommandResult pCommandResult)
          Convert the command results into repository items
 void setQueryBuilder(QueryBuilder pQueryBuilder)
           
 
Methods inherited from class atg.repository.RepositoryViewImpl
addNamedQuery, addQueryListener, canCacheQuery, createNamedQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeUncachedQuery, getCache, getCacheQueries, getItemDescriptor, getNamedQuery, getNamedQueryNames, getQueryCacheSize, getQueryDescriptor, getQueryExpireTimeout, getQueryListeners, getQueryName, getRepository, getViewName, invalidateQueryCache, removeNamedQuery, removeQueryDependency, removeQueryListener, sendQueryEvent, setItemDescriptor, setQueryCacheSize, setQueryExpireTimeout, setRepository, setViewName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


SUPPORTED_QUERIES

public static atg.repository.query.SupportedQueries SUPPORTED_QUERIES
Constructor Detail

IntegrationRepositoryView

public IntegrationRepositoryView()
Method Detail

setQueryBuilder

public void setQueryBuilder(QueryBuilder pQueryBuilder)

getQueryBuilder

public QueryBuilder getQueryBuilder()
Returns a QueryBuilder to use for creating Query objects

Specified by:
getQueryBuilder in interface RepositoryView
Specified by:
getQueryBuilder in class RepositoryViewImpl
Returns:
null if the RepositoryView does not support query operations

executeUncachedQuery

public RepositoryItem[] executeUncachedQuery(Query pQuery,
                                             QueryOptions pOptions)
                                      throws RepositoryException
Query the item using the item descriptor

Specified by:
executeUncachedQuery in class RepositoryViewImpl
Parameters:
pQuery - the query to execute
pOptions - the options to the query
Throws:
RepositoryException - if there is an error while performing the query operation

createQueryCommandInput

public abstract java.lang.Object createQueryCommandInput(Query pQuery,
                                                         QueryOptions pQueryOptions)
                                                  throws RepositoryException
This method will process the given Query and create the input that will be passed to the query command. This should be implemented by the subclass.

Throws:
RepositoryException

executeQueryCommand

public RepositoryItem[] executeQueryCommand(java.lang.Object pInput)
                                     throws RepositoryException
Execute the given command using the given inputs

Throws:
RepositoryException

processResults

protected RepositoryItem[] processResults(Command pCommand,
                                          CommandResult pCommandResult)
                                   throws RepositoryException
Convert the command results into repository items

Throws:
RepositoryException

executeCountQuery

public int executeCountQuery(Query pQuery)
Executes a query that returns the number of items that would be returned by given query.

Specified by:
executeCountQuery in interface RepositoryView
Specified by:
executeCountQuery in class RepositoryViewImpl
Parameters:
pQuery - the query to execute
Returns:
The number of RepositoryItems that would be returned by executeQuery(pQuery)
Throws:
RepositoryException - if there is an error while performing the query operation

applyOptions

public RepositoryItem[] applyOptions(RepositoryItem[] pItems,
                                     QueryOptions pOptions)
                              throws RepositoryException
Apply the query options to the given array of items. TBD

Throws:
RepositoryException