atg.repository
Interface NamedQueryView

All Superinterfaces:
RepositoryView
All Known Implementing Classes:
IntegrationRepositoryView, RepositoryViewImpl

public interface NamedQueryView
extends RepositoryView

This is a RepositoryView add-on that provides methods to allow the creation of Named Queries

A "Named Query" is simply an association between a String value and an atg.repository.Query object. The String is a user-defined name that can be used to retrieve the matching Query object from the ExtendedRepositoryView. How this is accomplished is up to the implementing class. Each Named Query can optionally have a atg.repository.QueryDescriptor object associated with them that contains information about the Named Query itself, such as the name, and a pointer to the Query object

See Also:
QueryDescriptor

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 void createNamedQuery(java.lang.String pQueryName, Query pQuery)
          Creates a Named Query.
 Query getNamedQuery(java.lang.String pQueryName)
          Gets the Repository Query object associated with the given name.
 java.lang.String[] getNamedQueryNames()
          Gets the names of all the current named queries that this RepositoryView is aware of, if any
 atg.repository.QueryDescriptor getQueryDescriptor(java.lang.String pQueryName)
          Gets the QueryDescriptor object associated with the given name which contains information about the named query.
 java.lang.String getQueryName(Query pQuery)
          Gets the name associated with the given Query, if any
 
Methods inherited from interface atg.repository.RepositoryView
executeCountQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getItemDescriptor, getQueryBuilder, getViewName
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

createNamedQuery

void createNamedQuery(java.lang.String pQueryName,
                      Query pQuery)
Creates a Named Query. This identifies an association between a user-defined name and a Repository Query object. Once this association has been established, the getNamedQuery method can be used to retrieve the same Repository Query with the given name.

Parameters:
pQueryName - the user-defined name of this query association
pQuery - the Query object identified by pQueryName

getNamedQuery

Query getNamedQuery(java.lang.String pQueryName)
Gets the Repository Query object associated with the given name. This association must be established with a previous call to createNamedQuery.

Parameters:
pQueryName - the user-defined name of the Query that should be returned
Returns:
the Query object associated with pQueryName, or null if no such association has been made

getNamedQueryNames

java.lang.String[] getNamedQueryNames()
Gets the names of all the current named queries that this RepositoryView is aware of, if any

Returns:
an array of names that represent named queries associations that this RepositoryView is aware of, or null if there are none

getQueryName

java.lang.String getQueryName(Query pQuery)
Gets the name associated with the given Query, if any

Parameters:
pQuery - the query to get the name for
Returns:
the name associated with the given Query, or null if the Query has no name associated with it

getQueryDescriptor

atg.repository.QueryDescriptor getQueryDescriptor(java.lang.String pQueryName)
Gets the QueryDescriptor object associated with the given name which contains information about the named query.

Parameters:
pQueryName - the name of the named query to get the QueryDescriptor for
Returns:
the QueryDescriptor for the given name, or null if none exists