本文整理了Java中org.apache.ibatis.plugin.Plugin.wrap()
方法的一些代码示例,展示了Plugin.wrap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plugin.wrap()
方法的具体详情如下:
包路径:org.apache.ibatis.plugin.Plugin
类名称:Plugin
方法名:wrap
暂无
代码示例来源:origin: pagehelper/Mybatis-PageHelper
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
}
代码示例来源:origin: pagehelper/Mybatis-PageHelper
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
}
代码示例来源:origin: baomidou/mybatis-plus
@Override
public Object plugin(Object target) {
if (target instanceof Executor) {
return Plugin.wrap(target, this);
}
return target;
}
代码示例来源:origin: baomidou/mybatis-plus
@Override
public Object plugin(Object target) {
if (target instanceof Executor) {
return Plugin.wrap(target, this);
}
return target;
}
代码示例来源:origin: baomidou/mybatis-plus
@Override
public Object plugin(Object target) {
if (target instanceof StatementHandler) {
return Plugin.wrap(target, this);
}
return target;
}
代码示例来源:origin: baomidou/mybatis-plus
@Override
public Object plugin(Object target) {
if (target instanceof StatementHandler) {
return Plugin.wrap(target, this);
}
return target;
}
代码示例来源:origin: baomidou/mybatis-plus
@Override
public Object plugin(Object target) {
if (target instanceof StatementHandler) {
return Plugin.wrap(target, this);
}
return target;
}
代码示例来源:origin: wuyouzhuguli/FEBS-Shiro
@Override
public Object plugin(Object arg0) {
return Plugin.wrap(arg0, this);
}
代码示例来源:origin: a466350665/smart
/**
* 只拦截这两种类型的 <br>
* StatementHandler <br>
* ResultSetHandler
*
* @param target
* @return
*/
@Override
public Object plugin(Object target) {
if (target instanceof StatementHandler || target instanceof ResultSetHandler) {
return Plugin.wrap(target, this);
}
else {
return target;
}
}
代码示例来源:origin: hs-web/hsweb-framework
@Override
public Object plugin(Object target) {
if (target instanceof StatementHandler) {
StatementHandler statementHandler = (StatementHandler) target;
MetaObject metaStatementHandler = SystemMetaObject.forObject(statementHandler);
String sql = statementHandler.getBoundSql().getSql();
Pager pager = Pager.getAndReset();
String newSql = sql;
if (sql.trim().toLowerCase().startsWith("select")) {
if (pager != null) {
newSql = EasyOrmSqlBuilder.getInstance()
.getActiveDatabase().getDialect()
.doPaging(sql, pager.pageIndex(), pager.pageSize());
}
Object queryEntity = statementHandler.getParameterHandler().getParameterObject();
if (queryEntity instanceof QueryParam && ((QueryParam) queryEntity).isForUpdate()) {
newSql = newSql + " for update";
}
metaStatementHandler.setValue("delegate.boundSql.sql", newSql);
}
}
return Plugin.wrap(target, this);
}
代码示例来源:origin: zhangxd1989/springboot-dubbox
@Override
public Object plugin(Object target) {
if (target instanceof Executor) {
return Plugin.wrap(target, this);
} else {
return target;
}
}
代码示例来源:origin: xianrendzw/EasyReport
@Override
public Object plugin(final Object target) {
if (target instanceof Executor) {
return Plugin.wrap(target, this);
}
return target;
}
代码示例来源:origin: Meituan-Dianping/Zebra
@Override
public Object plugin(Object target) {
if (target instanceof Executor) {
return Plugin.wrap(target, this);
} else {
return target;
}
}
代码示例来源:origin: mybatis-book/book
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
}
代码示例来源:origin: pig4cloud/pig
/**
* 生成拦截对象的代理
*
* @param target 目标对象
* @return 代理对象
*/
@Override
public Object plugin(Object target) {
if (target instanceof StatementHandler) {
return Plugin.wrap(target, this);
}
return target;
}
代码示例来源:origin: mybatis-book/book
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
}
代码示例来源:origin: mybatis-book/book
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
}
代码示例来源:origin: vakinge/jeesuite-libs
@Override
public Object plugin(Object target) {
if (target instanceof Executor) {
return Plugin.wrap(target, this);
} else {
return target;
}
}
代码示例来源:origin: babylikebird/common-admin
@Override
public Object plugin(Object target) {
if (target instanceof StatementHandler) {
return Plugin.wrap(target, this);
}
return target;
}
代码示例来源:origin: com.baomidou/mybatis-plus-extension
@Override
public Object plugin(Object target) {
if (target instanceof Executor) {
return Plugin.wrap(target, this);
}
return target;
}
内容来源于网络,如有侵权,请联系作者删除!