uk.co.lakesidetech.springxmldb.dao
Class BaseXUpdateXMLDBDao

java.lang.Object
  extended byuk.co.lakesidetech.springxmldb.dao.AbstractXMLDBDao
      extended byuk.co.lakesidetech.springxmldb.dao.BaseXUpdateXMLDBDao
All Implemented Interfaces:
IXUpdateXMLDBDao

public class BaseXUpdateXMLDBDao
extends AbstractXMLDBDao
implements IXUpdateXMLDBDao

Implementation of IXUpdateXMLDBDao using XML:DB apis to be reusable across any XML database which supports a pure XML:DB api.

Author:
Stuart Eccles

Field Summary
 
Fields inherited from class uk.co.lakesidetech.springxmldb.dao.AbstractXMLDBDao
dataSource, RESOURCETYPE_XMLRESOURCE, XPATHQUERYSERVICE_NAME, XPATHQUERYSERVICE_VERSION, XUPDATEQUERYSERVICE_NAME, XUPDATEQUERYSERVICE_VERSION
 
Constructor Summary
BaseXUpdateXMLDBDao()
           
 
Method Summary
protected  org.xmldb.api.modules.XUpdateQueryService getXUpdateQueryServiceFromCollection(org.xmldb.api.base.Collection collection)
          Get the XML:DB XUpdateQueryService for a specified collection
 void updateResourceWithXUpdate(java.lang.String xUpdate, java.lang.String resourceId, java.lang.String collectionPath)
          updates a specific resource with an xupdate string
 void updateWithXUpdate(java.lang.String xUpdate, java.lang.String collectionPath)
          update items within a collection with a specific Xupdate string
 
Methods inherited from class uk.co.lakesidetech.springxmldb.dao.AbstractXMLDBDao
getDataSource, getNameSpaces, getXPathQueryServiceFromCollection, getXUpdateServiceFromCollection, processResourceSetToDocuments, processResourceSetToStrings, setDataSource, setNameSpaces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseXUpdateXMLDBDao

public BaseXUpdateXMLDBDao()
Method Detail

getXUpdateQueryServiceFromCollection

protected org.xmldb.api.modules.XUpdateQueryService getXUpdateQueryServiceFromCollection(org.xmldb.api.base.Collection collection)
                                                                                  throws org.xmldb.api.base.XMLDBException
Get the XML:DB XUpdateQueryService for a specified collection

Parameters:
collection - the XML:DB collection object
Returns:
the XUpdate service
Throws:
org.xmldb.api.base.XMLDBException - if the service cannot be found

updateWithXUpdate

public void updateWithXUpdate(java.lang.String xUpdate,
                              java.lang.String collectionPath)
                       throws XMLDBDataAccessException
update items within a collection with a specific Xupdate string

Specified by:
updateWithXUpdate in interface IXUpdateXMLDBDao
Parameters:
xUpdate - the XUpdate string to use
collectionPath - The
Throws:
XMLDBDataAccessException
See Also:
IXUpdateXMLDBDao.updateWithXUpdate(java.lang.String, java.lang.String)

updateResourceWithXUpdate

public void updateResourceWithXUpdate(java.lang.String xUpdate,
                                      java.lang.String resourceId,
                                      java.lang.String collectionPath)
                               throws XMLDBDataAccessException
updates a specific resource with an xupdate string

Specified by:
updateResourceWithXUpdate in interface IXUpdateXMLDBDao
Parameters:
xUpdate - the xupdate string to run
resourceId - the resource to update
collectionPath - the collection the resource is in
Throws:
XMLDBDataAccessException - if anything goes wrong with the data access
See Also:
IXUpdateXMLDBDao.updateResourceWithXUpdate(java.lang.String, java.lang.String, java.lang.String)