Package org.sqlproc.engine.impl
Class SqlMetaOperator
java.lang.Object
org.sqlproc.engine.impl.SqlMetaConst
org.sqlproc.engine.impl.SqlMetaOperator
- All Implemented Interfaces:
SqlMetaElement
,SqlMetaLogOperand
,SqlMetaSimple
A META SQL sub-element. It represents a dynamic SQL operator.
- Author:
- Vladimir Hudec
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
An indicator the dynamic input values are used.static final String
static final String
Fields inherited from class org.sqlproc.engine.impl.SqlMetaConst
logger, values
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
ConstructorsConstructorDescriptionSqlMetaOperator
(boolean dynamicInputValue, List<String> elements) Creates a new instance of this entity using the list of sub-elements.SqlMetaOperator
(SqlInputValue.Code caseConversion) Creates a new instance of this entity.SqlMetaOperator
(SqlInputValue.Code caseConversion, boolean not) Creates a new instance of this entity.SqlMetaOperator
(SqlInputValue.Code caseConversion, boolean not, SqlType type) Creates a new instance of this entity. -
Method Summary
Modifier and TypeMethodDescription(package private) String
getData
(SqlProcessContext ctx, Object obj) Returns a String representation of input values, after a possible transformation process.(package private) String
Returns a default input value in the case the input attribute is null.(package private) Class
<?> getFieldType
(SqlProcessContext ctx, Class<?> attributeType, String attributeName) Returns the static input attribute type.(package private) Object
Returns the static or dynamic input values.(package private) Object
getProperty
(SqlProcessContext ctx, Object obj, String item) Returns the static input attribute value.Methods inherited from class org.sqlproc.engine.impl.SqlMetaConst
addConst, getElements, getSqlType, isNot, process, processExpression, setElements, setMetaType, setNot, setValues
-
Field Details
-
SEPARATOR
- See Also:
-
METHOD_GET_OP
- See Also:
-
dynamicInputValue
boolean dynamicInputValueAn indicator the dynamic input values are used.
-
-
Constructor Details
-
SqlMetaOperator
Creates a new instance of this entity. Used from inside ANTLR parser.- Parameters:
caseConversion
- which conversion should be done on inputValuenot
- an indicator, which is used to control, how the input value is added to the final ANSI SQLtype
- the type of this input value, which can be Hibernate or an internal type
-
SqlMetaOperator
Creates a new instance of this entity. Used from inside ANTLR parser.- Parameters:
caseConversion
- which conversion should be done on inputValuenot
- an indicator, which is used to control, how the input value is added to the final ANSI SQL
-
SqlMetaOperator
Creates a new instance of this entity. Used from inside ANTLR parser.- Parameters:
caseConversion
- which conversion should be done on inputValue
-
SqlMetaOperator
Creates a new instance of this entity using the list of sub-elements.- Parameters:
dynamicInputValue
- an indicator the dynamic input values are usedelements
- the list of sub-elements
-
-
Method Details
-
getInputValues
Returns the static or dynamic input values. The standard input values are the static ones.- Overrides:
getInputValues
in classSqlMetaConst
- Parameters:
ctx
- the crate for all input parameters and the context of processing- Returns:
- the static or dynamic input values
-
getDefaultData
String getDefaultData()Returns a default input value in the case the input attribute is null.- Overrides:
getDefaultData
in classSqlMetaConst
- Returns:
- a default input value
-
getFieldType
Returns the static input attribute type.- Overrides:
getFieldType
in classSqlMetaConst
- Parameters:
ctx
- the crate for all input parameters and the context of processingattributeType
- parents typeattributeName
- the attribute name- Returns:
- the static input attribute type
-
getProperty
Returns the static input attribute value.- Overrides:
getProperty
in classSqlMetaConst
- Parameters:
ctx
- the crate for all input parameters and the context of processingobj
- the static input value POJOitem
- the attribute name- Returns:
- the static input attribute value
-
getData
Returns a String representation of input values, after a possible transformation process.- Overrides:
getData
in classSqlMetaConst
- Parameters:
ctx
- the crate for all input parameters and the context of processingobj
- a raw input value- Returns:
- the transformed input value
-