public final class ScriptExecutor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
debug |
protected java.util.logging.Logger |
log |
Constructor and Description |
---|
ScriptExecutor(ScriptEl scriptEl) |
Modifier and Type | Method and Description |
---|---|
protected void |
execute(Connection connection,
Resource resource,
DynamicContext ctx)
Executes a script or a query resource using the specified connection.
|
void |
execute(DynamicContext ctx)
Executes the element.
|
Resource |
getContent(DialectIdentifier dialectIdentifier)
Returns content satisfying dialect information.
|
T |
getElement()
Returns scripting element specified in
constructor |
Location |
getLocation()
A short for
getElement() .getLocation() |
static ExecutableElement |
prepare(ScriptEl s) |
protected ContentEl |
prepareContent(ContentEl content)
Prepares the content for later execution.
|
public ScriptExecutor(ScriptEl scriptEl)
protected void execute(Connection connection, Resource resource, DynamicContext ctx)
connection
- connection to use for element execution.resource
- query/script content to execute.ctx
- dynamic context to use for variables, etc.public static ExecutableElement prepare(ScriptEl s)
public T getElement()
constructor
public final void execute(DynamicContext ctx)
ExecutableElement
Note: the context may be decorated by DynamicContextDecorator
.
execute
in interface ExecutableElement
ctx
- context to use.public Resource getContent(DialectIdentifier dialectIdentifier)
This method caches contents based on dialects. For now we assume dialectIdentifier is constant for element.
dialectIdentifier
- dialect identifier.public Location getLocation()
getElement()
.getLocation()
protected ContentEl prepareContent(ContentEl content)
If content is dynamic, i.e. contains includes with bind variables, the properties substitutor is specified, otherwise no properties .
content
- content to traverse.Copyright © Copyright 2006-2019 The Scriptella Project Team.