org.milyn.persistence
Class DaoFlusher
java.lang.Object
org.milyn.persistence.DaoFlusher
- All Implemented Interfaces:
- ContentHandler, DOMElementVisitor, DOMVisitAfter, DOMVisitBefore, DOMVisitor, SAXVisitAfter, SAXVisitBefore, SAXVisitor, Visitor
@VisitBeforeIf(condition="parameters.containsKey(\'flushBefore\') && parameters.flushBefore.value == \'true\'")
@VisitAfterIf(condition="!parameters.containsKey(\'flushBefore\') || parameters.flushBefore.value != \'true\'")
public class DaoFlusher
- extends Object
- implements DOMElementVisitor, SAXVisitBefore, SAXVisitAfter
DAO Flusher
This DAO flusher calls the flush method of a DAO.
Configuration
Namespace: http://www.milyn.org/xsd/smooks/persistence-1.2.xsd
Element: flusher
Attributes:
- flushOnElement : The element selector to select the element when the flusher should execute. (required)
- dao : The name of the DAO that needs to get flushed. If it is not set then the default DAO will be flushed. (optional)
- flushBefore : If the flusher should exeute on the 'before' event. (default: false)
Configuration Example
<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:dao="http://www.milyn.org/xsd/smooks/persistence-1.2.xsd">
<dao:flusher dao="dao" flushOnElement="root" flushBefore="false" />
</smooks-resource-list>
- Author:
- maurice.zeijen@smies.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DaoFlusher
public DaoFlusher()
initialize
@Initialize
public void initialize()
visitBefore
public void visitBefore(Element element,
ExecutionContext executionContext)
throws SmooksException
- Specified by:
visitBefore in interface DOMVisitBefore
- Throws:
SmooksException
visitAfter
public void visitAfter(Element element,
ExecutionContext executionContext)
throws SmooksException
- Specified by:
visitAfter in interface DOMVisitAfter
- Throws:
SmooksException
visitBefore
public void visitBefore(SAXElement element,
ExecutionContext executionContext)
throws SmooksException,
IOException
- Specified by:
visitBefore in interface SAXVisitBefore
- Throws:
SmooksException
IOException
visitAfter
public void visitAfter(SAXElement element,
ExecutionContext executionContext)
throws SmooksException,
IOException
- Specified by:
visitAfter in interface SAXVisitAfter
- Throws:
SmooksException
IOException
Copyright © 2011. All Rights Reserved.