public abstract class AbstractParamParser extends Object implements ParamParser
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
protected static String |
REGEX_COLON_MARK |
protected static String |
REGEX_DOLLAR_MARK |
protected static String |
REGEX_HASH_MARK |
protected static String |
REGEX_IN |
protected static String |
REGEX_QUESTION_MARK |
protected static String |
REGEX_SINGLE_QUOTE |
| Constructor and Description |
|---|
AbstractParamParser() |
| Modifier and Type | Method and Description |
|---|---|
protected Object[] |
getParamsClauseIN(Object params,
String name) |
String |
getPlaceholder()
Specifies a character that will be replaced to in SQL query.
|
protected String |
padspace(int size,
int index) |
String |
replaceForPlaceholder(String query)
Replace the parameters names for question marks
|
String |
replaceForPlaceholder(String query,
Object params)
Replace the parameters names for question marks
|
String |
replaceForPlaceholderWithNumber(String query,
Object params) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfind, getTypeprotected final org.slf4j.Logger log
protected static final String REGEX_SINGLE_QUOTE
protected static final String REGEX_IN
protected static final String REGEX_HASH_MARK
protected static final String REGEX_COLON_MARK
protected static final String REGEX_DOLLAR_MARK
protected static final String REGEX_QUESTION_MARK
public AbstractParamParser()
public String replaceForPlaceholder(String query)
ParamParserreplaceForPlaceholder in interface ParamParserquery - the SQL sentencepublic String replaceForPlaceholderWithNumber(String query, Object params)
replaceForPlaceholderWithNumber in interface ParamParserpublic String replaceForPlaceholder(String query, Object params)
ParamParserreplaceForPlaceholder in interface ParamParserquery - the SQL sentenceparams - parameters used at query, its necessary when the query use IN clausepublic String getPlaceholder()
ParamParser?getPlaceholder in interface ParamParserprotected Object[] getParamsClauseIN(Object params, String name)
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.