public class MiniDaoHandler extends Object implements InvocationHandler
| 限定符和类型 | 字段和说明 |
|---|---|
protected CountSqlParser |
countSqlParser |
DataSource |
dataSource
自定义的数据源
|
protected PageAutoDialect |
pageAutoDialect |
static String |
SEQ_NEXTVAL_SQL |
| 构造器和说明 |
|---|
MiniDaoHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
EmptyInterceptor |
getEmptyInterceptor() |
org.springframework.jdbc.core.JdbcTemplate |
getJdbcTemplate() |
String |
getKeyType() |
org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate |
getNamedParameterJdbcTemplate() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
boolean |
isFormatSql() |
List<Object> |
procedureParamsList(Method method,
Object[] args)
将解析参数的代码单独抽取出来
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setEmptyInterceptor(EmptyInterceptor emptyInterceptor) |
void |
setFormatSql(boolean formatSql) |
void |
setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) |
void |
setKeyType(String keyType) |
void |
setNamedParameterJdbcTemplate(org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedParameterJdbcTemplate) |
void |
setShowSql(boolean showSql) |
@Autowired(required=false) @Qualifier(value="minidaoDataSource") public DataSource dataSource
protected PageAutoDialect pageAutoDialect
protected CountSqlParser countSqlParser
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke 在接口中 InvocationHandlerThrowablepublic org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate()
public String getKeyType()
public org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate getNamedParameterJdbcTemplate()
public boolean isFormatSql()
public List<Object> procedureParamsList(Method method, Object[] args) throws Exception
method - args - Exceptionpublic void setFormatSql(boolean formatSql)
public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
public void setNamedParameterJdbcTemplate(org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedParameterJdbcTemplate)
public void setKeyType(String keyType)
public void setShowSql(boolean showSql)
public EmptyInterceptor getEmptyInterceptor()
public void setEmptyInterceptor(EmptyInterceptor emptyInterceptor)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Copyright © 2023. All rights reserved.