public class EntityLocator extends Object implements DOMElementVisitor, SAXVisitBefore, SAXVisitAfter, Producer, Consumer
<?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:locator beanId="entity" lookup="something" lookupOnElement="b"> <dao:params> <dao:value name="arg1" decoder="Integer" data="c" /> <dao:expression name="arg2">dAnde.d + dAnde.e</dao:expression> <dao:wiring name="arg3" beanIdRef="dAnde" wireOnElement="e" /> <dao:value name="arg4" data="f/@name" /> <dao:value name="arg5" decoder="Date" data="g" > <dao:decodeParam name="format">yyyy-MM-dd HH:mm:ss</dao:decodeParam> </dao:value> </dao:params> </dao:locator> <dao:locator beanId="customer" lookupOnElement="b"> <dao:query>from Customer c where c.id = :arg1</dao:query> <dao:params> <dao:value name="arg1" decoder="Integer" data="c" /> </dao:params> </dao:locator> </smooks-resource-list>
Constructor and Description |
---|
EntityLocator() |
Modifier and Type | Method and Description |
---|---|
boolean |
consumes(Object object)
Does this consumer consume the specified named object.
|
Set<? extends Object> |
getProducts()
Get the set of products produced by this producer instance.
|
void |
initialize() |
void |
initParameterContainer(ExecutionContext executionContext) |
void |
lookup(ExecutionContext executionContext,
Fragment source) |
Object |
lookup(Object dao,
ExecutionContext executionContext) |
void |
visitAfter(Element element,
ExecutionContext executionContext)
Visit the supplied element after visiting its child elements.
|
void |
visitAfter(SAXElement element,
ExecutionContext executionContext)
Visit the supplied element after visiting its child elements.
|
void |
visitBefore(Element element,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
void |
visitBefore(SAXElement element,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
@Initialize public void initialize() throws SmooksConfigurationException
SmooksConfigurationException
public Set<? extends Object> getProducts()
Producer
getProducts
in interface Producer
public boolean consumes(Object object)
Consumer
Producer
that is executing
on the same element. The consumer should only return false
if it knows for
certain that it doesn't consumer the specified named object. If uncertain, it should
error on the side of saying that it does consume the object.public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitBefore
visitBefore
in interface DOMVisitBefore
element
- The DOM element being visited.executionContext
- Request relative instance.SmooksException
- Element processing failure.public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitBefore
visitBefore
in interface SAXVisitBefore
element
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.IOException
- Error writing event to output writer.public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException
DOMVisitAfter
visitAfter
in interface DOMVisitAfter
element
- The DOM element being visited.executionContext
- Request relative instance.SmooksException
- Element processing failure.public void visitAfter(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException
SAXVisitAfter
visitAfter
in interface SAXVisitAfter
element
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.IOException
- Error writing event to output writer.public void initParameterContainer(ExecutionContext executionContext)
public void lookup(ExecutionContext executionContext, Fragment source)
public Object lookup(Object dao, ExecutionContext executionContext)
Copyright © 2020. All rights reserved.