Package de.calamanari.adl.sql
Class QueryTemplateParser
java.lang.Object
de.calamanari.adl.sql.QueryTemplateParser
A
QueryParameter parses a template with named parameters (${id}) to trigger the registered listener on any occurrence with the name and
the exact position.- Author:
- Karl Eilebrecht
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceWhen parsing a template a listener can replace the parameter references, typically with question marks and collect the parameters in correct order. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance with the givenQueryTemplateParser.ParameterListenerto be triggered -
Method Summary
Modifier and TypeMethodDescriptionvoidparseSqlTemplate(String template) Parses the given template and informs the listener about any parameter occurrence.
-
Constructor Details
-
QueryTemplateParser
Creates a new instance with the givenQueryTemplateParser.ParameterListenerto be triggered- Parameters:
listener-
-
-
Method Details
-
parseSqlTemplate
Parses the given template and informs the listener about any parameter occurrence.This allows the listener to conveniently convert the template in a final form (replace parameters).
- Parameters:
template-
-