public final class ScriptExecutor extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
debug |
protected 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.
|
protected final Logger log
protected final boolean debug
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()
constructorpublic final void execute(DynamicContext ctx)
ExecutableElementNote: the context may be decorated by DynamicContextDecorator.
execute in interface ExecutableElementctx - 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 © 2006-2012. All Rights Reserved.