Package org.sqlproc.engine.impl
Class SqlMetaLogExpr
java.lang.Object
org.sqlproc.engine.impl.SqlMetaLogExpr
- All Implemented Interfaces:
SqlMetaElement
,SqlMetaLogOperand
A META SQL sub-element.
Schematically:
SqlMetaLogExpr SqlMetaIdent SqlMetaConst SqlMetaLogOperator SqlMetaLogExpr for embedded ()
- Author:
- Vladimir Hudec
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) List
<SqlMetaLogOperand> The list of sub-elements based on ANTLR grammar.(package private) final org.slf4j.Logger
The internal slf4j logger.private boolean
The indicator, which reverses the final logical value.Fields inherited from interface org.sqlproc.engine.impl.SqlMetaElement
AND_PREFIX, CONST_PREFIX, IDENT_PREFIX, IDENT_SEPARATOR, lCONST_PREFIX, lIDENT_PREFIX, OR_PREFIX, SET_PREFIX, VALUES_PREFIX, WHERE_PREFIX
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance.SqlMetaLogExpr
(boolean not) Creates a new instance of this entity. -
Method Summary
Modifier and TypeMethodDescription(package private) void
addElement
(SqlMetaLogOperand element) Adds a new sub-element.(package private) boolean
isNot()
Returns the indicator, which reverses the final logical value.process
(SqlProcessContext ctx) The main contract for a dynamic ANSI SQL Query generation.boolean
The main contract to evaluate a logical value of META SQL sub-elements.(package private) void
setNot
(boolean not) Sets the indicator, which reverses the final logical value.
-
Field Details
-
logger
final org.slf4j.Logger loggerThe internal slf4j logger. -
not
private boolean notThe indicator, which reverses the final logical value. -
elements
List<SqlMetaLogOperand> elementsThe list of sub-elements based on ANTLR grammar. The evaluation of these sub-elements is little bit different compared to the evaluation of sub-elements in other SqlMetaXXX components. Every sub-element must bu true, not not-empty.
-
-
Constructor Details
-
SqlMetaLogExpr
SqlMetaLogExpr()Creates a new instance. It's used from inside ANTLR parser. -
SqlMetaLogExpr
SqlMetaLogExpr(boolean not) Creates a new instance of this entity. Used from inside ANTLR parser.- Parameters:
not
- the indicator, which reverses the final logical value
-
-
Method Details
-
addElement
Adds a new sub-element. It's used from inside ANTLR parser.- Parameters:
element
- new sub-element, based on ANTLR grammar
-
isNot
boolean isNot()Returns the indicator, which reverses the final logical value.- Returns:
- the indicator value
-
setNot
void setNot(boolean not) Sets the indicator, which reverses the final logical value.- Parameters:
not
- a new value of the indicator
-
processExpression
The main contract to evaluate a logical value of META SQL sub-elements.- Specified by:
processExpression
in interfaceSqlMetaLogOperand
- Parameters:
ctx
- the context for a dynamic ANSI SQL Query generation- Returns:
- a logical value
-
process
The main contract for a dynamic ANSI SQL Query generation. Also known as a META SQL processing. The composite pattern main contract. All ANTLR grammar based elements must implement this contract.- Specified by:
process
in interfaceSqlMetaElement
- Parameters:
ctx
- the crate for all input parameters and the context of processing
-