类 DataPermissionInterceptor

所有已实现的接口:
InnerInterceptor

public class DataPermissionInterceptor extends BaseMultiTableInnerInterceptor implements InnerInterceptor
数据权限处理器
从以下版本开始:
3.5.2
作者:
hubin
  • 构造器详细资料

    • DataPermissionInterceptor

      public DataPermissionInterceptor()
    • DataPermissionInterceptor

      public DataPermissionInterceptor(DataPermissionHandler dataPermissionHandler)
  • 方法详细资料

    • beforeQuery

      public void beforeQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql) throws SQLException
      从接口复制的说明: InnerInterceptor
      Executor.query(MappedStatement, Object, RowBounds, ResultHandler, CacheKey, BoundSql) 操作前置处理

      改改sql啥的

      指定者:
      beforeQuery 在接口中 InnerInterceptor
      参数:
      executor - Executor(可能是代理对象)
      ms - MappedStatement
      parameter - parameter
      rowBounds - rowBounds
      resultHandler - resultHandler
      boundSql - boundSql
      抛出:
      SQLException
    • beforePrepare

      public void beforePrepare(org.apache.ibatis.executor.statement.StatementHandler sh, Connection connection, Integer transactionTimeout)
      从接口复制的说明: InnerInterceptor
      StatementHandler.prepare(Connection, Integer) 操作前置处理

      改改sql啥的

      指定者:
      beforePrepare 在接口中 InnerInterceptor
      参数:
      sh - StatementHandler(可能是代理对象)
      connection - Connection
      transactionTimeout - transactionTimeout
    • processSelect

      protected void processSelect(net.sf.jsqlparser.statement.select.Select select, int index, String sql, Object obj)
      从类复制的说明: JsqlParserSupport
      查询
      覆盖:
      processSelect 在类中 JsqlParserSupport
    • setWhere

      protected void setWhere(net.sf.jsqlparser.statement.select.PlainSelect plainSelect, String whereSegment)
      设置 where 条件
      参数:
      plainSelect - 查询对象
      whereSegment - 查询条件片段
    • processUpdate

      protected void processUpdate(net.sf.jsqlparser.statement.update.Update update, int index, String sql, Object obj)
      update 语句处理
      覆盖:
      processUpdate 在类中 JsqlParserSupport
    • processDelete

      protected void processDelete(net.sf.jsqlparser.statement.delete.Delete delete, int index, String sql, Object obj)
      delete 语句处理
      覆盖:
      processDelete 在类中 JsqlParserSupport
    • getUpdateOrDeleteExpression

      protected net.sf.jsqlparser.expression.Expression getUpdateOrDeleteExpression(net.sf.jsqlparser.schema.Table table, net.sf.jsqlparser.expression.Expression where, String whereSegment)
    • buildTableExpression

      public net.sf.jsqlparser.expression.Expression buildTableExpression(net.sf.jsqlparser.schema.Table table, net.sf.jsqlparser.expression.Expression where, String whereSegment)
      从类复制的说明: BaseMultiTableInnerInterceptor
      构建数据库表的查询条件
      指定者:
      buildTableExpression 在类中 BaseMultiTableInnerInterceptor
      参数:
      table - 表对象
      where - 当前where条件
      whereSegment - 所属Mapper对象全路径
      返回:
      需要拼接的新条件(不会覆盖原有的where条件,只会在原有条件上再加条件),为 null 则不加入新的条件
    • getDataPermissionHandler

      public DataPermissionHandler getDataPermissionHandler()
    • setDataPermissionHandler

      public void setDataPermissionHandler(DataPermissionHandler dataPermissionHandler)
    • toString

      public String toString()
      覆盖:
      toString 在类中 BaseMultiTableInnerInterceptor
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 BaseMultiTableInnerInterceptor
    • canEqual

      protected boolean canEqual(Object other)
      覆盖:
      canEqual 在类中 BaseMultiTableInnerInterceptor
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 BaseMultiTableInnerInterceptor