|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.repository.RepositoryViewImpl
public abstract class RepositoryViewImpl
This is a basic implementation for the RepositoryView class. It implements properties for all of the settable values.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected atg.repository.query.QueryCache |
mCache
currently active query cache |
static java.lang.String |
RESOURCE_BUNDLE_NAME
|
Constructor Summary | |
---|---|
RepositoryViewImpl()
|
Method Summary | |
---|---|
void |
addNamedQuery(java.lang.String pQueryName,
atg.repository.QueryDescriptor pDescriptor)
Adds an entry to the named query map |
void |
addQueryListener(atg.repository.QueryListener pListener)
Adds a query event listener from this view. |
boolean |
canCacheQuery(java.util.List pDependencies)
You might override this method to try and deal with a subtle synchronization issue. |
void |
createNamedQuery(java.lang.String pQueryName,
Query pQuery)
Creates a named query. |
abstract int |
executeCountQuery(Query pQuery)
Executes a query that returns the number of items that would be returned by given query. |
RepositoryItem[] |
executeQuery(Query pQuery)
Executes the given query and returns an array of the matching RepositoryItems (not ids) |
RepositoryItem[] |
executeQuery(Query pQuery,
int pStartingIndex)
Executes the given query and returns an array of matching RepositoryItems, beginning at the starting index element. |
RepositoryItem[] |
executeQuery(Query pQuery,
int pStartingIndex,
int pEndingIndex)
Executes the given query and returns an array of matching RepositoryItems, which are contained within a total potential result set. |
RepositoryItem[] |
executeQuery(Query pQuery,
int pStartingIndex,
int pEndingIndex,
SortDirectives pSortDirectives)
Executes the given query and returns an array of matching RepositoryItems, which are contained within a total potential result set. |
RepositoryItem[] |
executeQuery(Query pQuery,
int pStartingIndex,
SortDirectives pSortDirectives)
Executes the given query and returns an array of matching RepositoryItems, beginning at the starting index element. |
RepositoryItem[] |
executeQuery(Query pQuery,
QueryOptions pQueryOptions)
Executes the given query and returns an array of the matching RepositoryItems (not ids) |
RepositoryItem[] |
executeQuery(Query pQuery,
SortDirectives pSortDirectives)
Executes the given query and returns an array of the matching RepositoryItems (not ids) |
abstract RepositoryItem[] |
executeUncachedQuery(Query pQuery,
QueryOptions pOptions)
Subclasses determine how query requests are actually satisfied |
RepositoryItem[] |
executeUncachedQuery(Query pQuery,
QueryOptions pOptions,
java.lang.Object[] pParameterValues)
This is a stub implementation so that the QueryCache doesn't have to deal with specific RepositoryView implementations when it calls executeUncachedQuery() with variables. |
atg.repository.query.QueryCache |
getCache()
Get property cache |
boolean |
getCacheQueries()
|
RepositoryItemDescriptor |
getItemDescriptor()
Returns the RepositoryItemDescriptor property, which describes the known properties for all the items in the view |
Query |
getNamedQuery(java.lang.String pQueryName)
Gets the Repository Query corresponding to the given name |
java.lang.String[] |
getNamedQueryNames()
Returns the names of all the named queries known by this view |
abstract QueryBuilder |
getQueryBuilder()
Returns a QueryBuilder to use for creating Query objects |
int |
getQueryCacheSize()
|
atg.repository.QueryDescriptor |
getQueryDescriptor(java.lang.String pQueryName)
Gets the QueryDescriptor object associated with the given name. |
long |
getQueryExpireTimeout()
|
java.util.List |
getQueryListeners()
Returns the list of query listeners that are registered on this view. |
java.lang.String |
getQueryName(Query pQuery)
Gets the name associated with the given Query, if any |
Repository |
getRepository()
Get property Repository |
java.lang.String |
getViewName()
Get property ViewName |
void |
invalidateQueryCache()
Removes all entries from the query cache |
void |
removeNamedQuery(java.lang.String pQueryName)
Removes an entry from the named query map |
void |
removeQueryDependency(atg.repository.query.QueryDependency pList)
When a query cache entry is invalidated, we need to remove all cache entries that depend on the same set of properties, the QueryDependency. |
void |
removeQueryListener(atg.repository.QueryListener pListener)
Removes a query event listener from this view. |
void |
sendQueryEvent(Query pQuery,
QueryOptions pQueryOptions,
RepositoryItem[] pResults)
Sends a QueryEvent |
void |
setItemDescriptor(RepositoryItemDescriptor pItemDescriptor)
Sets the property ItemDescriptor. |
void |
setQueryCacheSize(int pQueryCacheSize)
Sets the property queryCacheSize. |
void |
setQueryExpireTimeout(long pQueryExpireTimeout)
Sets the property query expire timeout. |
void |
setRepository(Repository pRepository)
Set property Repository |
void |
setViewName(java.lang.String pViewName)
Set property ViewName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String RESOURCE_BUNDLE_NAME
protected atg.repository.query.QueryCache mCache
Constructor Detail |
---|
public RepositoryViewImpl()
Method Detail |
---|
public atg.repository.query.QueryCache getCache()
cache
cache
public void setViewName(java.lang.String pViewName)
pViewName
- new value to setpublic java.lang.String getViewName()
getViewName
in interface RepositoryView
public void setRepository(Repository pRepository)
pRepository
- new value to setpublic Repository getRepository()
public void setItemDescriptor(RepositoryItemDescriptor pItemDescriptor)
pItemDescriptor
- new value to setpublic RepositoryItemDescriptor getItemDescriptor()
RepositoryView
getItemDescriptor
in interface RepositoryView
public boolean getCacheQueries()
public void setQueryCacheSize(int pQueryCacheSize)
pQueryCacheSize
- new value to setpublic int getQueryCacheSize()
public void setQueryExpireTimeout(long pQueryExpireTimeout)
public long getQueryExpireTimeout()
public void addNamedQuery(java.lang.String pQueryName, atg.repository.QueryDescriptor pDescriptor)
pQueryName
- the name of the query to addpDescriptor
- the query descriptor describing the querypublic void removeNamedQuery(java.lang.String pQueryName)
pQueryName
- the name of the query to removepublic RepositoryItem[] executeQuery(Query pQuery) throws RepositoryException
executeQuery
in interface RepositoryView
pQuery
- the query to execute
RepositoryException
- if there is an error while performing
the query operationpublic RepositoryItem[] executeQuery(Query pQuery, SortDirectives pSortDirectives) throws RepositoryException
executeQuery
in interface RepositoryView
pQuery
- the query to executepSortDirectives
- the directives to sort the result set with
RepositoryException
- if there is an error while performing
the query operationpublic RepositoryItem[] executeQuery(Query pQuery, int pStartingIndex) throws RepositoryException
executeQuery
in interface RepositoryView
pQuery
- the query to executepStartingIndex
- the beginning index, inclusive
RepositoryException
- if there is an error while performing
the query operationpublic RepositoryItem[] executeQuery(Query pQuery, int pStartingIndex, SortDirectives pSortDirectives) throws RepositoryException
executeQuery
in interface RepositoryView
pQuery
- the query to executepStartingIndex
- the beginning index, inclusivepSortDirectives
- the directives to sort the result set with
RepositoryException
- if there is an error while performing
the query operationpublic RepositoryItem[] executeQuery(Query pQuery, int pStartingIndex, int pEndingIndex) throws RepositoryException
executeQuery
in interface RepositoryView
pQuery
- the query to executepStartingIndex
- the beginning index, inclusivepEndingIndex
- the ending index, exclusive.
RepositoryException
- if there is an error while performing
the query operationpublic abstract QueryBuilder getQueryBuilder()
getQueryBuilder
in interface RepositoryView
public RepositoryItem[] executeQuery(Query pQuery, int pStartingIndex, int pEndingIndex, SortDirectives pSortDirectives) throws RepositoryException
executeQuery
in interface RepositoryView
pQuery
- the query to executepStartingIndex
- the beginning index, inclusivepEndingIndex
- the ending index, exclusive.pSortDirectives
- the directives to sort the result set with
RepositoryException
- if there is an error while performing
the query operationpublic RepositoryItem[] executeQuery(Query pQuery, QueryOptions pQueryOptions) throws RepositoryException
executeQuery
in interface RepositoryView
pQuery
- the query to executepQueryOptions
- A set of options that may modify the query
RepositoryException
- if there is an error while performing
the query operationpublic void createNamedQuery(java.lang.String pQueryName, Query pQuery)
createNamedQuery
in interface NamedQueryView
pQueryName
- the name of the querypQuery
- the Query object associated with the namepublic Query getNamedQuery(java.lang.String pQueryName)
getNamedQuery
in interface NamedQueryView
pQueryName
- the name of the query to retrieve
pQueryName
or null if no Query exists by that namepublic java.lang.String getQueryName(Query pQuery)
getQueryName
in interface NamedQueryView
pQuery
- the query to get the name for
public java.lang.String[] getNamedQueryNames()
getNamedQueryNames
in interface NamedQueryView
public atg.repository.QueryDescriptor getQueryDescriptor(java.lang.String pQueryName)
getQueryDescriptor
in interface NamedQueryView
pQueryName
- the name of the named query to get the QueryDescriptor
for
public abstract int executeCountQuery(Query pQuery) throws RepositoryException
executeCountQuery
in interface RepositoryView
pQuery
- the query to execute
executeQuery(pQuery)
RepositoryException
- if there is an error while performing
the query operationpublic abstract RepositoryItem[] executeUncachedQuery(Query pQuery, QueryOptions pOptions) throws RepositoryException
RepositoryException
public RepositoryItem[] executeUncachedQuery(Query pQuery, QueryOptions pOptions, java.lang.Object[] pParameterValues) throws RepositoryException
pQuery
- the query to executepQueryOptions
- A set of options that may modify the querypParameterValues
- values of any parameter expressions that
are in the given query. Each expression is replaced in the order
that it is encountered with the corresponding parameter value e.g.
the first parameter is replaced with pParameterValues[0], the second
parameter is replaced with pParameterValues[1], etc.
RepositoryException
public void invalidateQueryCache()
public boolean canCacheQuery(java.util.List pDependencies)
public void removeQueryDependency(atg.repository.query.QueryDependency pList)
In some cases, it might make sense to leave the property list around so that we don't have to add the listeners, but I think it is simpler/safer to just clean up the mess.
pList
- dependencies to use in finding entries to invalidatepublic void addQueryListener(atg.repository.QueryListener pListener)
public void removeQueryListener(atg.repository.QueryListener pListener)
public java.util.List getQueryListeners()
public void sendQueryEvent(Query pQuery, QueryOptions pQueryOptions, RepositoryItem[] pResults)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |