All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.mybatisplus.interceptor.QueryInterceptor Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.mybatisplus.interceptor;

import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import org.springframework.core.Ordered;

/**
 * 自定义{@code Mybatis-Plus}查询拦截器。
 *
 */
@SuppressWarnings({"rawtypes"})
public interface QueryInterceptor extends Ordered {

    /**
     * 拦截处理。
     *
     * @param executor 执行器
     * @param ms 语句
     * @param parameter 参数
     * @param rowBounds 行绑定器
     * @param resultHandler 结果处理器
     * @param boundSql 绑定{@code SQL}
     */
    void intercept(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql);

    /**
     * 优先级顺序。
     *
     * @return 优先级
     */
    @Override
    default int getOrder() {
        return Ordered.LOWEST_PRECEDENCE;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy