Class LogicalProvider


  • public class LogicalProvider
    extends Object
    支持逻辑删除的provider实现

    NOTE: 使用时需要在实体类字段上声明@LogicalColumn注解

    Author:
    hzw
    • Constructor Summary

      Constructors 
      Constructor Description
      LogicalProvider()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static String countByExample​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据 Example 条件查询总数
      static String delete​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据实体信息批量删除
      static String deleteByExample​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据 Example 删除
      static String deleteByPrimaryKey​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据主键逻辑删除
      static String select​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)  
      static String selectByExample​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据 Example 条件批量查询,根据 Example 条件查询总数,查询结果的数量由方法定义
      static String selectByPrimaryKey​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据主键查找未被逻辑删除的值
      static String selectColumns​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据实体字段条件查询唯一的实体,根据实体字段条件批量查询,查询结果的数量由方法定义
      static String selectCount​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据实体字段条件查询总数
      static String updateByExample​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据 Example 条件批量更新实体信息
      static String updateByExampleSelective​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据 Example 条件批量更新实体不为空的字段
      static String updateByExampleSetValues​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据 Example 条件批量更新实体信息
      static String updateByPrimaryKey​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据主键更新实体
      static String updateByPrimaryKeySelective​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据主键更新实体中不为空的字段
      static String updateByPrimaryKeySelectiveWithForceFields​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      根据主键更新实体中不为空的字段,强制字段不区分是否null,都更新
    • Constructor Detail

      • LogicalProvider

        public LogicalProvider()
    • Method Detail

      • select

        public static String select​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
      • selectColumns

        public static String selectColumns​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据实体字段条件查询唯一的实体,根据实体字段条件批量查询,查询结果的数量由方法定义
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • selectByExample

        public static String selectByExample​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据 Example 条件批量查询,根据 Example 条件查询总数,查询结果的数量由方法定义
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • countByExample

        public static String countByExample​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据 Example 条件查询总数
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • selectByPrimaryKey

        public static String selectByPrimaryKey​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据主键查找未被逻辑删除的值
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • selectCount

        public static String selectCount​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据实体字段条件查询总数
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • updateByExample

        public static String updateByExample​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据 Example 条件批量更新实体信息
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • updateByExampleSelective

        public static String updateByExampleSelective​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据 Example 条件批量更新实体不为空的字段
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • updateByExampleSetValues

        public static String updateByExampleSetValues​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据 Example 条件批量更新实体信息
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • updateByPrimaryKey

        public static String updateByPrimaryKey​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据主键更新实体
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • updateByPrimaryKeySelective

        public static String updateByPrimaryKeySelective​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据主键更新实体中不为空的字段
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • updateByPrimaryKeySelectiveWithForceFields

        public static String updateByPrimaryKeySelectiveWithForceFields​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据主键更新实体中不为空的字段,强制字段不区分是否null,都更新
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • delete

        public static String delete​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据实体信息批量删除
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • deleteByPrimaryKey

        public static String deleteByPrimaryKey​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据主键逻辑删除
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey
      • deleteByExample

        public static String deleteByExample​(org.apache.ibatis.builder.annotation.ProviderContext providerContext)
        根据 Example 删除
        Parameters:
        providerContext - 上下文
        Returns:
        cacheKey