org.milyn.persistence
Class EntityDeleter

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

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

DAO Deleter

This DAO deleter calls the delete 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: deleter
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:deleter dao="dao" name="deleteIt" beanId="toDelete1" deleteOnElement="root" deletedBeanId="deleted" deleteBefore="false" />

 </smooks-resource-list>
 

Author:
maurice.zeijen@smies.com

Constructor Summary
EntityDeleter()
           
 
Method Summary
 boolean consumes(java.lang.Object object)
           
 java.util.Set<java.lang.String> getProducts()
           
 void initialize()
           
 void visitAfter(org.w3c.dom.Element element, ExecutionContext executionContext)
           
 void visitAfter(SAXElement element, ExecutionContext executionContext)
           
 void visitBefore(org.w3c.dom.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

EntityDeleter

public EntityDeleter()
Method Detail

initialize

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

getProducts

public java.util.Set<java.lang.String> getProducts()
Specified by:
getProducts in interface Producer

consumes

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

visitBefore

public void visitBefore(org.w3c.dom.Element element,
                        ExecutionContext executionContext)
                 throws SmooksException
Specified by:
visitBefore in interface DOMVisitBefore
Throws:
SmooksException

visitAfter

public void visitAfter(org.w3c.dom.Element element,
                       ExecutionContext executionContext)
                throws SmooksException
Specified by:
visitAfter in interface DOMVisitAfter
Throws:
SmooksException

visitBefore

public void visitBefore(SAXElement element,
                        ExecutionContext executionContext)
                 throws SmooksException,
                        java.io.IOException
Specified by:
visitBefore in interface SAXVisitBefore
Throws:
SmooksException
java.io.IOException

visitAfter

public void visitAfter(SAXElement element,
                       ExecutionContext executionContext)
                throws SmooksException,
                       java.io.IOException
Specified by:
visitAfter in interface SAXVisitAfter
Throws:
SmooksException
java.io.IOException


Copyright © 2011. All Rights Reserved.