org.milyn.persistence
Class EntityUpdater

java.lang.Object
  extended by org.milyn.persistence.EntityUpdater
All Implemented Interfaces:
ContentHandler, DOMElementVisitor, DOMVisitAfter, DOMVisitBefore, DOMVisitor, Consumer, Producer, SAXVisitAfter, SAXVisitBefore, SAXVisitor, Visitor

@VisitBeforeIf(condition="parameters.containsKey(\'updateBefore\') && parameters.updateBefore.value == \'true\'")
@VisitAfterIf(condition="!parameters.containsKey(\'updateBefore\') || parameters.updateBefore.value != \'true\'")
public class EntityUpdater
extends Object
implements DOMElementVisitor, SAXVisitBefore, SAXVisitAfter, Producer, Consumer

DAO Updater

This DAO updater calls the update method of a DAO, using a entity bean from the bean context as parameter.

Configuration

Namespace: http://www.milyn.org/xsd/smooks/persistence-1.2.xsd
Element: updater
Attributes: * This attribute is not supported by all scribe adapters.

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:updater dao="dao" name="updateIt" beanId="toUpdate" updateOnElement="root" updateBeanId="updated" updateBefore="false" />

 </smooks-resource-list>
 

Author:
maurice.zeijen@smies.com

Constructor Summary
EntityUpdater()
           
 
Method Summary
 boolean consumes(Object object)
           
 Set<? extends Object> getProducts()
           
 void initialize()
           
 void visitAfter(Element element, ExecutionContext executionContext)
           
 void visitAfter(SAXElement element, ExecutionContext executionContext)
           
 void visitBefore(Element element, ExecutionContext executionContext)
           
 void visitBefore(SAXElement element, ExecutionContext executionContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityUpdater

public EntityUpdater()
Method Detail

initialize

@Initialize
public void initialize()
                throws SmooksConfigurationException
Throws:
SmooksConfigurationException

getProducts

public Set<? extends Object> getProducts()
Specified by:
getProducts in interface Producer

consumes

public boolean consumes(Object object)
Specified by:
consumes in interface Consumer

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.