com.xpn.xwiki.plugin.query
Interface IQueryFactory

All Known Implementing Classes:
QueryPlugin, QueryPluginApi

public interface IQueryFactory

AbstractFactory interface for XWiki Queries


Method Summary
 IQuery getAttachment(java.lang.String docname, java.lang.String attachname, java.lang.String order)
          create query for attachments
 XWikiCache getCache()
           
 IQuery getChildDocs(java.lang.String docname, java.lang.String prop, java.lang.String order)
          create query for child documents
 XWikiContext getContext()
           
 IQuery getDocs(java.lang.String docname, java.lang.String prop, java.lang.String order)
          create query for docs
 IQuery getObjects(java.lang.String docname, java.lang.String oclass, java.lang.String prop, java.lang.String order)
          create query for objects
 XWikiStoreInterface getStore()
           
 IQuery ql(java.lang.String q)
          create JCRSQL query unsupported for now
 IQuery xpath(java.lang.String q)
          create xpath query
 

Method Detail

xpath

IQuery xpath(java.lang.String q)
             throws javax.jcr.query.InvalidQueryException
create xpath query

Throws:
javax.jcr.query.InvalidQueryException

ql

IQuery ql(java.lang.String q)
          throws javax.jcr.query.InvalidQueryException
create JCRSQL query unsupported for now

Throws:
javax.jcr.query.InvalidQueryException

getDocs

IQuery getDocs(java.lang.String docname,
               java.lang.String prop,
               java.lang.String order)
               throws javax.jcr.query.InvalidQueryException
create query for docs

Parameters:
docname - - full document name (web/name | web.name). name may consist xpath []-selection. if any (name|web) - *
prop - - return properties, separated by comma, property start with @, if null - return document
order - - properties for sort, separated by ','; order: ascending/descending after prop. name, or +/- before. if null - not sort
Throws:
javax.jcr.query.InvalidQueryException

getChildDocs

IQuery getChildDocs(java.lang.String docname,
                    java.lang.String prop,
                    java.lang.String order)
                    throws javax.jcr.query.InvalidQueryException
create query for child documents

Parameters:
web,docname - must be without templates & [] select
Throws:
javax.jcr.query.InvalidQueryException
See Also:
getDocs

getAttachment

IQuery getAttachment(java.lang.String docname,
                     java.lang.String attachname,
                     java.lang.String order)
                     throws javax.jcr.query.InvalidQueryException
create query for attachments

Parameters:
attachname - - name of attachment, may be *, *[]
Throws:
javax.jcr.query.InvalidQueryException
See Also:
getDocs

getObjects

IQuery getObjects(java.lang.String docname,
                  java.lang.String oclass,
                  java.lang.String prop,
                  java.lang.String order)
                  throws javax.jcr.query.InvalidQueryException
create query for objects

Parameters:
oclass - - full name of object class (web/name | web.name). if any(name|web) - *
prop. - for flex-attributes use @f:flexname
Throws:
javax.jcr.query.InvalidQueryException
See Also:
getDocs

getCache

XWikiCache getCache()

getContext

XWikiContext getContext()

getStore

XWikiStoreInterface getStore()


Copyright 2003 Ludovic Dubost