Class ParamLocationRecognizer

  • All Implemented Interfaces:
    ParameterRecognizer

    public class ParamLocationRecognizer
    extends Object
    implements ParameterRecognizer
    Implements a parameter parser recognizer specifically for the purpose of journaling parameter locations.
    • Constructor Detail

      • ParamLocationRecognizer

        public ParamLocationRecognizer()
      • ParamLocationRecognizer

        public ParamLocationRecognizer​(int jdbcStyleOrdinalCountBase)
    • Method Detail

      • validate

        public void validate()
      • ordinalParameter

        public void ordinalParameter​(int position)
        Description copied from interface: ParameterRecognizer
        Called when an ordinal parameter is recognized
        Specified by:
        ordinalParameter in interface ParameterRecognizer
        Parameters:
        position - The position within the query
      • namedParameter

        public void namedParameter​(String name,
                                   int position)
        Description copied from interface: ParameterRecognizer
        Called when a named parameter is recognized
        Specified by:
        namedParameter in interface ParameterRecognizer
        Parameters:
        name - The recognized parameter name
        position - The position within the query
      • jpaPositionalParameter

        public void jpaPositionalParameter​(int name,
                                           int position)
        Description copied from interface: ParameterRecognizer
        Called when a JPA-style named parameter is recognized
        Specified by:
        jpaPositionalParameter in interface ParameterRecognizer
        Parameters:
        name - The label (identifier) of the JPA-style parameter. e.g. for a parameter `?2`, the label is `2`
        position - The position within the query
      • other

        public void other​(char character)
        Description copied from interface: ParameterRecognizer
        Called when a character that is not part of a parameter is recognized.
        Specified by:
        other in interface ParameterRecognizer
        Parameters:
        character - The recognized character
      • outParameter

        public void outParameter​(int position)
        Description copied from interface: ParameterRecognizer
        Called when an output parameter is recognized. This should only ever be called once for a query in cases where the JDBC "function call" escape syntax is recognized, i.e. "{?=call...}"
        Specified by:
        outParameter in interface ParameterRecognizer
        Parameters:
        position - The position within the query