Class SqlMetaOperator

java.lang.Object
org.sqlproc.engine.impl.SqlMetaConst
org.sqlproc.engine.impl.SqlMetaOperator
All Implemented Interfaces:
SqlMetaElement, SqlMetaLogOperand, SqlMetaSimple

class SqlMetaOperator extends SqlMetaConst
A META SQL sub-element. It represents a dynamic SQL operator.
Author:
Vladimir Hudec
  • Field Details

  • Constructor Details

    • SqlMetaOperator

      public SqlMetaOperator(SqlInputValue.Code caseConversion, boolean not, SqlType type)
      Creates a new instance of this entity. Used from inside ANTLR parser.
      Parameters:
      caseConversion - which conversion should be done on inputValue
      not - an indicator, which is used to control, how the input value is added to the final ANSI SQL
      type - the type of this input value, which can be Hibernate or an internal type
    • SqlMetaOperator

      public SqlMetaOperator(SqlInputValue.Code caseConversion, boolean not)
      Creates a new instance of this entity. Used from inside ANTLR parser.
      Parameters:
      caseConversion - which conversion should be done on inputValue
      not - an indicator, which is used to control, how the input value is added to the final ANSI SQL
    • SqlMetaOperator

      public SqlMetaOperator(SqlInputValue.Code caseConversion)
      Creates a new instance of this entity. Used from inside ANTLR parser.
      Parameters:
      caseConversion - which conversion should be done on inputValue
    • SqlMetaOperator

      public SqlMetaOperator(boolean dynamicInputValue, List<String> elements)
      Creates a new instance of this entity using the list of sub-elements.
      Parameters:
      dynamicInputValue - an indicator the dynamic input values are used
      elements - the list of sub-elements
  • Method Details

    • getInputValues

      Object getInputValues(SqlProcessContext ctx)
      Returns the static or dynamic input values. The standard input values are the static ones.
      Overrides:
      getInputValues in class SqlMetaConst
      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 class SqlMetaConst
      Returns:
      a default input value
    • getFieldType

      Class<?> getFieldType(SqlProcessContext ctx, Class<?> attributeType, String attributeName)
      Returns the static input attribute type.
      Overrides:
      getFieldType in class SqlMetaConst
      Parameters:
      ctx - the crate for all input parameters and the context of processing
      attributeType - parents type
      attributeName - the attribute name
      Returns:
      the static input attribute type
    • getProperty

      Object getProperty(SqlProcessContext ctx, Object obj, String item)
      Returns the static input attribute value.
      Overrides:
      getProperty in class SqlMetaConst
      Parameters:
      ctx - the crate for all input parameters and the context of processing
      obj - the static input value POJO
      item - the attribute name
      Returns:
      the static input attribute value
    • getData

      String getData(SqlProcessContext ctx, Object obj)
      Returns a String representation of input values, after a possible transformation process.
      Overrides:
      getData in class SqlMetaConst
      Parameters:
      ctx - the crate for all input parameters and the context of processing
      obj - a raw input value
      Returns:
      the transformed input value