class SqlMetaSqlFragment extends Object implements SqlMetaElement
Schematically:
SqlMetaSqlFragment
{= IDENT SqlMetaIfItem}
where IDENT can be
where for WHERE fragment of the final SQL query/statement
set for WHERE fragment of the final SQL update statement
values for WHERE fragment of the final SQL insert statement
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
SqlMetaSqlFragment.Type
The enumeration of types.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) List<SqlMetaIfItem> |
elements
The list of sub-elements based on ANTLR grammar.
|
(package private) org.slf4j.Logger |
logger
The internal slf4j logger.
|
(package private) boolean |
optimistic
The indicator for the types WHERE and SET in the case of optimistic locking.
|
(package private) static Pattern |
patternColumns |
(package private) static Pattern |
patternSet |
(package private) static Pattern |
patternValues |
(package private) static Pattern |
patternWhere |
(package private) SqlMetaSqlFragment.Type |
type
The type if this element.
|
AND_PREFIX, CONST_PREFIX, IDENT_PREFIX, IDENT_SEPARATOR, lCONST_PREFIX, lIDENT_PREFIX, OR_PREFIX, SET_PREFIX, VALUES_PREFIX, WHERE_PREFIX| Constructor and Description |
|---|
SqlMetaSqlFragment(SqlMetaSqlFragment.Type type)
Creates a new instance.
|
SqlMetaSqlFragment(String type)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addElement(SqlMetaIfItem element)
Adds a new sub-element.
|
(package private) void |
handleSqlFragment(StringBuilder s,
SqlProcessContext ctx)
Handle the SQL fragment based on the statement type and/or the
SqlMetaSqlFragment.Type. |
SqlProcessResult |
process(SqlProcessContext ctx)
The main contract for a dynamic ANSI SQL Query generation.
|
final org.slf4j.Logger logger
static final Pattern patternWhere
static final Pattern patternValues
static final Pattern patternSet
static final Pattern patternColumns
List<SqlMetaIfItem> elements
SqlMetaSqlFragment.Type type
boolean optimistic
SqlMetaSqlFragment(SqlMetaSqlFragment.Type type)
type - the type, which is used to control, how the related ANSI SQL fragment is added to the final ANSI SQL.SqlMetaSqlFragment(String type)
type - the type, which is used to control, how the related ANSI SQL fragment is added to the final ANSI SQL.void addElement(SqlMetaIfItem element)
element - new sub-element, based on ANTLR grammarvoid handleSqlFragment(StringBuilder s, SqlProcessContext ctx)
SqlMetaSqlFragment.Type.s - a buffer for the generated SQL statementctx - the crate for all input parameters and the context of processingpublic SqlProcessResult process(SqlProcessContext ctx)
process in interface SqlMetaElementctx - the crate for all input parameters and the context of processingCopyright © 2014. All Rights Reserved.