Class ParamParserNoMark

  • All Implemented Interfaces:
    ParamParser

    public class ParamParserNoMark
    extends Object
    implements ParamParser
    No make the parser from sql parameter, used at tag without support like (IncludeTag, ProcedureTag, etc)
    Author:
    alisson gomes
    • Method Detail

      • emptyParser

        public static ParamParser emptyParser()
        Empty parser from sql parameter
        Returns:
        implementation doesn't make the parser
      • find

        public String[] find​(String query)
        Description copied from interface: ParamParser
        extract the parameters names from query.
        Specified by:
        find in interface ParamParser
        Parameters:
        query - the SQL sentence
        Returns:
        array parameters from query
      • replaceForPlaceholder

        public String replaceForPlaceholder​(String query,
                                            Object params)
        Description copied from interface: ParamParser
        Replace the parameters names for question marks
        Specified by:
        replaceForPlaceholder in interface ParamParser
        Parameters:
        query - the SQL sentence
        params - parameters used at query, its necessary when the query use IN clause
        Returns:
        the new SQL sentence with question marks.
      • replaceForPlaceholder

        public String replaceForPlaceholder​(String query)
        Description copied from interface: ParamParser
        Replace the parameters names for question marks
        Specified by:
        replaceForPlaceholder in interface ParamParser
        Parameters:
        query - the SQL sentence
        Returns:
        the new SQL sentence with question marks.
      • getPlaceholder

        public String getPlaceholder()
        Description copied from interface: ParamParser
        Specifies a character that will be replaced to in SQL query. Default is ?
        Specified by:
        getPlaceholder in interface ParamParser
        Returns:
        the place holder from parser