@VisitBeforeIf(condition="parameters.containsKey(\'executeBefore\') && parameters.executeBefore.value == \'true\'") @VisitAfterIf(condition="!parameters.containsKey(\'executeBefore\') || parameters.executeBefore.value != \'true\'") public class SQLExecutor extends Object implements SmooksResourceConfigurationFactory, SAXVisitBefore, SAXVisitAfter, DOMElementVisitor, Producer, Consumer
Modifier and Type | Class and Description |
---|---|
static class |
SQLExecutor.ResultSetScopeDecoder |
Constructor and Description |
---|
SQLExecutor() |
Modifier and Type | Method and Description |
---|---|
boolean |
consumes(Object object)
Does this consumer consume the specified named object.
|
SmooksResourceConfiguration |
createConfiguration()
Create the configuration instance.
|
Set<?> |
getProducts()
Get the set of products produced by this producer instance.
|
String |
getResultSetName() |
void |
intitialize() |
SQLExecutor |
setDatasource(AbstractDataSource datasource) |
SQLExecutor |
setExecuteBefore(boolean executeBefore) |
SQLExecutor |
setResultSetName(String resultSetName) |
SQLExecutor |
setResultSetScope(ResultSetScope resultSetScope) |
SQLExecutor |
setResultSetTTL(long resultSetTTL) |
SQLExecutor |
setStatement(String statement) |
void |
visitAfter(Element element,
ExecutionContext executionContext)
Visit the supplied element after visiting its child elements.
|
void |
visitAfter(SAXElement saxElement,
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 saxElement,
ExecutionContext executionContext)
Visit the supplied element before visiting its child elements.
|
public SQLExecutor setDatasource(AbstractDataSource datasource)
public SQLExecutor setStatement(String statement)
public SQLExecutor setResultSetName(String resultSetName)
public String getResultSetName()
public SQLExecutor setResultSetScope(ResultSetScope resultSetScope)
public SQLExecutor setResultSetTTL(long resultSetTTL)
public SQLExecutor setExecuteBefore(boolean executeBefore)
public SmooksResourceConfiguration createConfiguration()
SmooksResourceConfigurationFactory
createConfiguration
in interface SmooksResourceConfigurationFactory
@Initialize public void intitialize() throws SmooksConfigurationException
SmooksConfigurationException
public Set<?> 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(SAXElement saxElement, ExecutionContext executionContext) throws SmooksException
SAXVisitBefore
visitBefore
in interface SAXVisitBefore
saxElement
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.public void visitAfter(SAXElement saxElement, ExecutionContext executionContext) throws SmooksException
SAXVisitAfter
visitAfter
in interface SAXVisitAfter
saxElement
- The SAX element being visited.executionContext
- Execution context.SmooksException
- Event processing failure.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 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.Copyright © 2020. All rights reserved.