@Component(roles=XWikiStoreInterface.class) @Named(value="cache") @InstantiationStrategy(value=PER_LOOKUP) public class XWikiCacheStore extends com.xpn.xwiki.internal.store.AbstractXWikiStore implements XWikiCacheStoreInterface, org.xwiki.observation.EventListener, org.xwiki.component.phase.Initializable
| Constructor and Description |
|---|
XWikiCacheStore()
Default constructor generally used by the Component Manager.
|
XWikiCacheStore(XWikiStoreInterface store,
XWikiContext context)
Deprecated.
since 10.2 and 9.11.4, should be used as a component instead
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp(XWikiContext context) |
int |
countDocuments(String parametrizedSqlClause,
List<?> parameterValues,
XWikiContext context)
API allowing to count the total number of documents that would be returned by a parameterized query.
|
int |
countDocuments(String wheresql,
XWikiContext context)
API allowing to count the total number of documents that would be returned by a query.
|
void |
createWiki(String wikiName,
XWikiContext context)
Allows to create a new wiki database and initialize the default tables.
|
void |
deleteLinks(long docId,
XWikiContext context,
boolean bTransaction) |
void |
deleteLock(XWikiLock lock,
XWikiContext context,
boolean bTransaction) |
void |
deleteWiki(String wikiName,
XWikiContext context)
Delete a wiki database.
|
void |
deleteXWikiDoc(XWikiDocument doc,
XWikiContext inputxcontext) |
boolean |
exists(XWikiDocument doc,
XWikiContext inputxcontext) |
void |
flushCache() |
org.xwiki.cache.Cache<XWikiDocument> |
getCache() |
List<String> |
getClassList(XWikiContext context) |
List<String> |
getCustomMappingPropertyList(BaseClass bclass) |
List<org.xwiki.observation.event.Event> |
getEvents() |
String |
getKey(String wiki,
String fullName,
String language)
Deprecated.
since 4.0M1, use
XWikiDocument.getKey() |
String |
getKey(String fullName,
String language,
XWikiContext context)
Deprecated.
since 4.0M1, use
XWikiDocument.getKey() |
String |
getKey(XWikiDocument doc)
Deprecated.
since 4.0M1, use
XWikiDocument.getKey() |
String |
getKey(XWikiDocument doc,
XWikiContext context) |
int |
getLimitSize(XWikiContext context,
Class<?> entityType,
String propertyName)
Get the limit size of a property.
|
org.xwiki.cache.Cache<Integer> |
getLimitSizePropertyCache() |
String |
getName() |
org.xwiki.cache.Cache<Boolean> |
getPageExistCache() |
QueryManager |
getQueryManager() |
XWikiStoreInterface |
getStore() |
List<String> |
getTranslationList(XWikiDocument doc,
XWikiContext context) |
void |
initCache(int capacity,
int pageExistCacheCapacity,
XWikiContext context)
Deprecated.
|
void |
initCache(XWikiContext context)
Deprecated.
|
void |
initialize() |
boolean |
injectCustomMapping(BaseClass doc1class,
XWikiContext context) |
void |
injectCustomMappings(XWikiContext context) |
boolean |
injectCustomMappings(XWikiDocument doc,
XWikiContext context) |
void |
injectUpdatedCustomMappings(XWikiContext context) |
boolean |
isCustomMappingValid(BaseClass bclass,
String custommapping1,
XWikiContext context) |
boolean |
isWikiNameAvailable(String wikiName,
XWikiContext context)
Indicate if the provided wiki name could be used to create a new wiki.
|
List<DocumentReference> |
loadBacklinks(DocumentReference documentReference,
boolean bTransaction,
XWikiContext context) |
List<String> |
loadBacklinks(String fullName,
XWikiContext context,
boolean bTransaction) |
List<XWikiLink> |
loadLinks(long docId,
XWikiContext context,
boolean bTransaction) |
XWikiLock |
loadLock(long docId,
XWikiContext context,
boolean bTransaction) |
XWikiDocument |
loadXWikiDoc(XWikiDocument doc,
XWikiContext inputxcontext) |
void |
onEvent(org.xwiki.observation.event.Event event,
Object source,
Object data) |
void |
renameXWikiDoc(XWikiDocument doc,
DocumentReference newReference,
XWikiContext inputxcontext)
Atomic operation for renaming a document.
|
void |
saveLinks(XWikiDocument doc,
XWikiContext context,
boolean bTransaction) |
void |
saveLock(XWikiLock lock,
XWikiContext context,
boolean bTransaction) |
void |
saveXWikiDoc(XWikiDocument doc,
XWikiContext context) |
void |
saveXWikiDoc(XWikiDocument doc,
XWikiContext inputxcontext,
boolean bTransaction) |
<T> List<T> |
search(String sql,
int nb,
int start,
List<?> parameterValues,
XWikiContext context)
Execute a reading request with parameters and return result.
|
<T> List<T> |
search(String sql,
int nb,
int start,
Object[][] whereParams,
List<?> parameterValues,
XWikiContext context)
Execute a reading request with parameters and return result.
|
<T> List<T> |
search(String sql,
int nb,
int start,
Object[][] whereParams,
XWikiContext context)
Execute a reading request and return result.
|
<T> List<T> |
search(String sql,
int nb,
int start,
XWikiContext context)
Execute a reading request and return result.
|
List<DocumentReference> |
searchDocumentReferences(String parametrizedSqlClause,
int nb,
int start,
List<?> parameterValues,
XWikiContext context)
Search documents by passing HQL where clause values as parameters.
|
List<DocumentReference> |
searchDocumentReferences(String wheresql,
int nb,
int start,
String selectColumns,
XWikiContext context) |
List<DocumentReference> |
searchDocumentReferences(String wheresql,
int nb,
int start,
XWikiContext context) |
List<DocumentReference> |
searchDocumentReferences(String parametrizedSqlClause,
List<?> parameterValues,
XWikiContext context)
Same as
XWikiStoreInterface.searchDocumentReferences(String, int, int, List, XWikiContext) but returns all rows. |
List<DocumentReference> |
searchDocumentReferences(String wheresql,
XWikiContext context) |
List<XWikiDocument> |
searchDocuments(String wheresql,
boolean distinctbylanguage,
boolean customMapping,
boolean checkRight,
int nb,
int start,
List<?> parameterValues,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
boolean distinctbyname,
boolean customMapping,
boolean checkRight,
int nb,
int start,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
boolean distinctbylanguage,
boolean customMapping,
int nb,
int start,
List<?> parameterValues,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
boolean distinctbyname,
boolean customMapping,
int nb,
int start,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
boolean distinctbyname,
boolean customMapping,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
boolean distinctbylanguage,
int nb,
int start,
List<?> parameterValues,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
boolean distinctbyname,
int nb,
int start,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
boolean distinctbyname,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
int nb,
int start,
List<?> parameterValues,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
int nb,
int start,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
List<?> parameterValues,
XWikiContext context)
Search documents in the storing system.
|
List<XWikiDocument> |
searchDocuments(String wheresql,
XWikiContext context)
Search documents in the storing system.
|
List<String> |
searchDocumentsNames(String parametrizedSqlClause,
int nb,
int start,
List<?> parameterValues,
XWikiContext context) |
List<String> |
searchDocumentsNames(String wheresql,
int nb,
int start,
String selectColumns,
XWikiContext context) |
List<String> |
searchDocumentsNames(String wheresql,
int nb,
int start,
XWikiContext context) |
List<String> |
searchDocumentsNames(String parametrizedSqlClause,
List<?> parameterValues,
XWikiContext context) |
List<String> |
searchDocumentsNames(String wheresql,
XWikiContext context) |
void |
setCache(org.xwiki.cache.Cache<XWikiDocument> cache) |
void |
setPageExistCache(org.xwiki.cache.Cache<Boolean> pageExistCache) |
void |
setStore(XWikiStoreInterface store) |
getExecutionXContext, restoreExecutionXContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinjectCustomMapping, isCustomMappingValidpublic XWikiCacheStore()
public XWikiCacheStore(XWikiStoreInterface store, XWikiContext context) throws XWikiException
XWikiExceptionpublic void initialize()
throws org.xwiki.component.phase.InitializationException
initialize in interface org.xwiki.component.phase.Initializableorg.xwiki.component.phase.InitializationExceptionpublic String getName()
getName in interface org.xwiki.observation.EventListenerpublic List<org.xwiki.observation.event.Event> getEvents()
getEvents in interface org.xwiki.observation.EventListener@Deprecated public void initCache(XWikiContext context) throws XWikiException
XWikiException@Deprecated public void initCache(int capacity, int pageExistCacheCapacity, XWikiContext context) throws XWikiException
initCache in interface XWikiCacheStoreInterfaceXWikiExceptionpublic XWikiStoreInterface getStore()
getStore in interface XWikiCacheStoreInterfacepublic void setStore(XWikiStoreInterface store)
setStore in interface XWikiCacheStoreInterfacepublic void saveXWikiDoc(XWikiDocument doc, XWikiContext context) throws XWikiException
saveXWikiDoc in interface XWikiStoreInterfaceXWikiExceptionpublic void renameXWikiDoc(XWikiDocument doc, DocumentReference newReference, XWikiContext inputxcontext) throws XWikiException
XWikiStoreInterfacerenameXWikiDoc in interface XWikiStoreInterfacedoc - the actual document instance to rename.newReference - the new reference to use for renaming.inputxcontext - the current context.XWikiException - in case of problem during the rename.public void saveXWikiDoc(XWikiDocument doc, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
saveXWikiDoc in interface XWikiStoreInterfaceXWikiExceptionpublic void flushCache()
flushCache in interface XWikiCacheStoreInterfacepublic void onEvent(org.xwiki.observation.event.Event event,
Object source,
Object data)
onEvent in interface org.xwiki.observation.EventListener@Deprecated public String getKey(XWikiDocument doc)
XWikiDocument.getKey()public String getKey(XWikiDocument doc, XWikiContext context)
@Deprecated public String getKey(String fullName, String language, XWikiContext context)
XWikiDocument.getKey()@Deprecated public String getKey(String wiki, String fullName, String language)
XWikiDocument.getKey()public XWikiDocument loadXWikiDoc(XWikiDocument doc, XWikiContext inputxcontext) throws XWikiException
loadXWikiDoc in interface XWikiStoreInterfaceXWikiExceptionpublic void deleteXWikiDoc(XWikiDocument doc, XWikiContext inputxcontext) throws XWikiException
deleteXWikiDoc in interface XWikiStoreInterfaceXWikiExceptionpublic List<String> getClassList(XWikiContext context) throws XWikiException
getClassList in interface XWikiStoreInterfaceXWikiExceptionpublic int countDocuments(String wheresql, XWikiContext context) throws XWikiException
XWikiStoreInterfacecountDocuments in interface XWikiStoreInterfacewheresql - Query to use, similar to the ones accepted by XWikiStoreInterface.searchDocuments(String, XWikiContext). It
should not contain order by or group clauses, since this kind of queries are not
portable.context - The current request context.XWikiException - if there was a problem executing the query.public List<DocumentReference> searchDocumentReferences(String wheresql, XWikiContext context) throws XWikiException
searchDocumentReferences in interface XWikiStoreInterfaceXWikiExceptionpublic List<String> searchDocumentsNames(String wheresql, XWikiContext context) throws XWikiException
searchDocumentsNames in interface XWikiStoreInterfaceXWikiExceptionpublic List<DocumentReference> searchDocumentReferences(String wheresql, int nb, int start, XWikiContext context) throws XWikiException
searchDocumentReferences in interface XWikiStoreInterfaceXWikiExceptionpublic List<String> searchDocumentsNames(String wheresql, int nb, int start, XWikiContext context) throws XWikiException
searchDocumentsNames in interface XWikiStoreInterfaceXWikiExceptionpublic List<DocumentReference> searchDocumentReferences(String wheresql, int nb, int start, String selectColumns, XWikiContext context) throws XWikiException
searchDocumentReferences in interface XWikiStoreInterfaceXWikiExceptionpublic List<String> searchDocumentsNames(String wheresql, int nb, int start, String selectColumns, XWikiContext context) throws XWikiException
searchDocumentsNames in interface XWikiStoreInterfaceXWikiExceptionpublic List<DocumentReference> searchDocumentReferences(String parametrizedSqlClause, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException
XWikiStoreInterfaceExample:
#set($orphans = $xwiki.searchDocuments(" where doc.fullName <> ?1 and (doc.parent = ?2 or "
+ "(doc.parent = ?3 and doc.space = ?4))",
["${doc.fullName}as", ${doc.fullName}, ${doc.name}, ${doc.space}]))
searchDocumentReferences in interface XWikiStoreInterfaceparametrizedSqlClause - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))nb - the number of rows to return. If 0 then all rows are returnedstart - the number of rows to skip. If 0 don't skip any rowparameterValues - the where clause values that replace the question marks (?)context - the XWiki context required for getting information about the execution contextXWikiException - in case of error while performing the querypublic List<String> searchDocumentsNames(String parametrizedSqlClause, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException
searchDocumentsNames in interface XWikiStoreInterfaceXWikiExceptionpublic List<DocumentReference> searchDocumentReferences(String parametrizedSqlClause, List<?> parameterValues, XWikiContext context) throws XWikiException
XWikiStoreInterfaceXWikiStoreInterface.searchDocumentReferences(String, int, int, List, XWikiContext) but returns all rows.searchDocumentReferences in interface XWikiStoreInterfaceXWikiExceptionXWikiStoreInterface.searchDocumentReferences(String, int, int, java.util.List, com.xpn.xwiki.XWikiContext)public List<String> searchDocumentsNames(String parametrizedSqlClause, List<?> parameterValues, XWikiContext context) throws XWikiException
searchDocumentsNames in interface XWikiStoreInterfaceXWikiExceptionpublic boolean isCustomMappingValid(BaseClass bclass, String custommapping1, XWikiContext context) throws XWikiException
isCustomMappingValid in interface XWikiStoreInterfaceXWikiExceptionpublic boolean injectCustomMapping(BaseClass doc1class, XWikiContext context) throws XWikiException
injectCustomMapping in interface XWikiStoreInterfaceXWikiExceptionpublic boolean injectCustomMappings(XWikiDocument doc, XWikiContext context) throws XWikiException
injectCustomMappings in interface XWikiStoreInterfaceXWikiExceptionpublic List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbyname, XWikiContext context) throws XWikiException
XWikiStoreInterfacesearchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))distinctbyname - when a document has multiple version for each language it is returned as one document a
language.context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbyname, boolean customMapping, XWikiContext context) throws XWikiException
XWikiStoreInterfacesearchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))distinctbyname - when a document has multiple version for each language it is returned as one document a
language.customMapping - inject custom mapping in session.context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbyname, int nb, int start, XWikiContext context) throws XWikiException
XWikiStoreInterfacesearchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))distinctbyname - when a document has multiple version for each language it is returned as one document a
language.nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbyname, boolean customMapping, int nb, int start, XWikiContext context) throws XWikiException
XWikiStoreInterfacesearchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))distinctbyname - when a document has multiple version for each language it is returned as one document a
language.customMapping - inject custom mapping in session.nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, XWikiContext context) throws XWikiException
XWikiStoreInterfacesearchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, int nb, int start, XWikiContext context) throws XWikiException
XWikiStoreInterfacesearchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbyname, boolean customMapping, boolean checkRight, int nb, int start, XWikiContext context) throws XWikiException
XWikiStoreInterfacesearchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))distinctbyname - when a document has multiple version for each language it is returned as one document a
language.customMapping - inject custom mapping in session.checkRight - if true check for each found document if context's user has "view" rights for it.nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbylanguage, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException
XWikiStoreInterfacesearchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))distinctbylanguage - when a document has multiple version for each language it is returned as one document a
language.nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.parameterValues - the where clause values that replace the question marks (?).context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, List<?> parameterValues, XWikiContext context) throws XWikiException
XWikiStoreInterfaceSearch documents by passing HQL where clause values as parameters. This allows generating a Named HQL query which will automatically encode the passed values (like escaping single quotes). This API is recommended to be used over the other similar methods where the values are passed inside the where clause and for which you'll need to do the encoding/escpaing yourself before calling them.
searchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))parameterValues - the where clause values that replace the question marks (?).context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbylanguage, boolean customMapping, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException
XWikiStoreInterfaceSearch documents by passing HQL where clause values as parameters. This allows generating a Named HQL query which will automatically encode the passed values (like escaping single quotes). This API is recommended to be used over the other similar methods where the values are passed inside the where clause and for which you'll need to do the encoding/escpaing yourself before calling them.
searchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))distinctbylanguage - when a document has multiple version for each language it is returned as one document a
language.customMapping - inject custom mapping in session.nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.parameterValues - the where clause values that replace the question marks (?).context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException
XWikiStoreInterfaceSearch documents by passing HQL where clause values as parameters. This allows generating a Named HQL query which will automatically encode the passed values (like escaping single quotes). This API is recommended to be used over the other similar methods where the values are passed inside the where clause and for which you'll need to do the encoding/escpaing yourself before calling them.
searchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.parameterValues - the where clause values that replace the question marks (?).context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbylanguage, boolean customMapping, boolean checkRight, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException
XWikiStoreInterfaceSearch documents by passing HQL where clause values as parameters. This allows generating a Named HQL query which will automatically encode the passed values (like escaping single quotes). This API is recommended to be used over the other similar methods where the values are passed inside the where clause and for which you'll need to do the encoding/escpaing yourself before calling them.
searchDocuments in interface XWikiStoreInterfacewheresql - the HQL where clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))distinctbylanguage - when a document has multiple version for each language it is returned as one document a
language.customMapping - inject custom mapping in session.checkRight - if true check for each found document if context's user has "view" rights for it.nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.parameterValues - the where clause values that replace the question marks (?).context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public int countDocuments(String parametrizedSqlClause, List<?> parameterValues, XWikiContext context) throws XWikiException
XWikiStoreInterfacecountDocuments in interface XWikiStoreInterfaceparametrizedSqlClause - Parameterized query to use, similar to the ones accepted by
XWikiStoreInterface.searchDocuments(String, List, XWikiContext). It should not contain order by or
group clauses, since this kind of queries are not portable.parameterValues - The parameter values that replace the question marks.context - The current request context.XWikiException - if there was a problem executing the query.public XWikiLock loadLock(long docId, XWikiContext context, boolean bTransaction) throws XWikiException
loadLock in interface XWikiStoreInterfaceXWikiExceptionpublic void saveLock(XWikiLock lock, XWikiContext context, boolean bTransaction) throws XWikiException
saveLock in interface XWikiStoreInterfaceXWikiExceptionpublic void deleteLock(XWikiLock lock, XWikiContext context, boolean bTransaction) throws XWikiException
deleteLock in interface XWikiStoreInterfaceXWikiExceptionpublic List<XWikiLink> loadLinks(long docId, XWikiContext context, boolean bTransaction) throws XWikiException
loadLinks in interface XWikiStoreInterfaceXWikiExceptionpublic List<DocumentReference> loadBacklinks(DocumentReference documentReference, boolean bTransaction, XWikiContext context) throws XWikiException
loadBacklinks in interface XWikiStoreInterfaceXWikiExceptionpublic List<String> loadBacklinks(String fullName, XWikiContext context, boolean bTransaction) throws XWikiException
loadBacklinks in interface XWikiStoreInterfaceXWikiExceptionpublic void saveLinks(XWikiDocument doc, XWikiContext context, boolean bTransaction) throws XWikiException
saveLinks in interface XWikiStoreInterfaceXWikiExceptionpublic void deleteLinks(long docId,
XWikiContext context,
boolean bTransaction)
throws XWikiException
deleteLinks in interface XWikiStoreInterfaceXWikiExceptionpublic <T> List<T> search(String sql, int nb, int start, XWikiContext context) throws XWikiException
XWikiStoreInterfacesearch in interface XWikiStoreInterfacesql - the HQL request clause. For example: where doc.fullName
<> ?1 and (doc.parent = ?2 or (doc.parent = ?3 and doc.space = ?4))nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public <T> List<T> search(String sql, int nb, int start, Object[][] whereParams, XWikiContext context) throws XWikiException
XWikiStoreInterfacesearch in interface XWikiStoreInterfacesql - the HQL request.nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.whereParams - if not null add to sql a where clause based on a table of table containing field name,
field value and compared symbol (=, >, etc.).context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public <T> List<T> search(String sql, int nb, int start, List<?> parameterValues, XWikiContext context) throws XWikiException
XWikiStoreInterfaceExecute query by passing HQL request values as parameters. This allows generating a Named HQL query which will automatically encode the passed values (like escaping single quotes). This API is recommended to be used over the other similar methods where the values are passed inside the where clause and for which you'll need to do the encoding/escaping yourself before calling them.
search in interface XWikiStoreInterfacesql - the HQL request.nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.parameterValues - the where clause values that replace the question marks (?).context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public <T> List<T> search(String sql, int nb, int start, Object[][] whereParams, List<?> parameterValues, XWikiContext context) throws XWikiException
XWikiStoreInterfaceExecute query by passing HQL request values as parameters. This allows generating a Named HQL query which will automatically encode the passed values (like escaping single quotes). This API is recommended to be used over the other similar methods where the values are passed inside the where clause and for which you'll need to do the encoding/escaping yourself before calling them.
search in interface XWikiStoreInterfacesql - the HQL request.nb - the number of rows to return. If 0 then all rows are returned.start - the number of rows to skip. If 0 don't skip any row.whereParams - if not null add to sql a where clause based on a table of table containing field name,
field value and compared symbol (=, >, etc.).parameterValues - the where clause values that replace the question marks (?).context - the XWiki context required for getting information about the execution context.XWikiException - in case of error while performing the query.public void cleanUp(XWikiContext context)
cleanUp in interface XWikiStoreInterfacepublic boolean isWikiNameAvailable(String wikiName, XWikiContext context) throws XWikiException
XWikiStoreInterfaceisWikiNameAvailable in interface XWikiStoreInterfacewikiName - the name of the wiki.context - the XWiki context.XWikiException - error when looking if wiki name already used.public void createWiki(String wikiName, XWikiContext context) throws XWikiException
XWikiStoreInterfacecreateWiki in interface XWikiStoreInterfacewikiName - the name of the new wiki.context - the XWiki context.XWikiException - error when creating new wiki.public void deleteWiki(String wikiName, XWikiContext context) throws XWikiException
XWikiStoreInterfacedeleteWiki in interface XWikiStoreInterfacewikiName - the name of the wiki.context - the XWiki context.XWikiException - error when deleting wiki database.public boolean exists(XWikiDocument doc, XWikiContext inputxcontext) throws XWikiException
exists in interface XWikiStoreInterfaceXWikiExceptionpublic org.xwiki.cache.Cache<XWikiDocument> getCache()
public void setCache(org.xwiki.cache.Cache<XWikiDocument> cache)
public org.xwiki.cache.Cache<Boolean> getPageExistCache()
public void setPageExistCache(org.xwiki.cache.Cache<Boolean> pageExistCache)
@Unstable public org.xwiki.cache.Cache<Integer> getLimitSizePropertyCache()
public List<String> getCustomMappingPropertyList(BaseClass bclass)
getCustomMappingPropertyList in interface XWikiStoreInterfacepublic void injectCustomMappings(XWikiContext context) throws XWikiException
injectCustomMappings in interface XWikiStoreInterfaceXWikiExceptionpublic void injectUpdatedCustomMappings(XWikiContext context) throws XWikiException
injectUpdatedCustomMappings in interface XWikiStoreInterfaceXWikiExceptionpublic List<String> getTranslationList(XWikiDocument doc, XWikiContext context) throws XWikiException
getTranslationList in interface XWikiStoreInterfaceXWikiExceptionpublic QueryManager getQueryManager()
getQueryManager in interface XWikiStoreInterfacepublic int getLimitSize(XWikiContext context, Class<?> entityType, String propertyName)
XWikiStoreInterfacegetLimitSize in interface XWikiStoreInterfacecontext - the context of the wiki to retrieve the propertyentityType - the entityType where the property is located.propertyName - the property on which we want the limit size.Copyright © 2004–2021 XWiki. All rights reserved.