Package net.sf.jkniv.sqlegance.params
Class ParamParserNoMark
- java.lang.Object
-
- net.sf.jkniv.sqlegance.params.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParamParseremptyParser()Empty parser from sql parameterString[]find(String query)extract the parameters names from query.StringgetPlaceholder()Specifies a character that will be replaced to in SQL query.ParamMarkTypegetType()StringreplaceForPlaceholder(String query)Replace the parameters names for question marksStringreplaceForPlaceholder(String query, Object params)Replace the parameters names for question marksStringreplaceForPlaceholderWithNumber(String query, Object params)
-
-
-
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:ParamParserextract the parameters names from query.- Specified by:
findin interfaceParamParser- Parameters:
query- the SQL sentence- Returns:
- array parameters from query
-
replaceForPlaceholder
public String replaceForPlaceholder(String query, Object params)
Description copied from interface:ParamParserReplace the parameters names for question marks- Specified by:
replaceForPlaceholderin interfaceParamParser- Parameters:
query- the SQL sentenceparams- parameters used at query, its necessary when the query use IN clause- Returns:
- the new SQL sentence with question marks.
-
replaceForPlaceholderWithNumber
public String replaceForPlaceholderWithNumber(String query, Object params)
- Specified by:
replaceForPlaceholderWithNumberin interfaceParamParser
-
replaceForPlaceholder
public String replaceForPlaceholder(String query)
Description copied from interface:ParamParserReplace the parameters names for question marks- Specified by:
replaceForPlaceholderin interfaceParamParser- Parameters:
query- the SQL sentence- Returns:
- the new SQL sentence with question marks.
-
getType
public ParamMarkType getType()
- Specified by:
getTypein interfaceParamParser
-
getPlaceholder
public String getPlaceholder()
Description copied from interface:ParamParserSpecifies a character that will be replaced to in SQL query. Default is?- Specified by:
getPlaceholderin interfaceParamParser- Returns:
- the place holder from parser
-
-