接口 UpdateService<T,ID>

类型参数:
T -
所有已知子接口:
SqlBeanService<T,ID>

public interface UpdateService<T,ID>
Update 通用业务接口
版本:
1.0
作者:
Jovi
  • 方法概要

    修饰符和类型
    方法
    说明
    int
    update(Update<T> update)
    更新(where条件为空会抛异常,因为更新全部非常危险)
    int
    update(Update<T> update, boolean ignore)
    更新
    int
    updateBy(T bean, boolean updateNotNull, boolean optimisticLock, Column[] filterColumns, String where, Object... args)
    根据条件更新
    int
    updateBy(T bean, boolean updateNotNull, boolean optimisticLock, ConditionHandle<T> cond)
    根据条件更新
    int
    updateBy(T bean, boolean updateNotNull, boolean optimisticLock, ConditionHandle<T> cond, Column... filterColumns)
    根据条件更新
    <R> int
    updateBy(T bean, boolean updateNotNull, boolean optimisticLock, ConditionHandle<T> cond, ColumnFun<T,R>... filterColumns)
    根据条件更新
    int
    updateBy(T bean, boolean updateNotNull, boolean optimisticLock, Wrapper wrapper)
    根据条件更新
    int
    updateBy(T bean, boolean updateNotNull, boolean optimisticLock, Wrapper wrapper, Column... filterColumns)
    根据条件更新
    <R> int
    updateBy(T bean, boolean updateNotNull, boolean optimisticLock, Wrapper wrapper, ColumnFun<T,R>... filterColumns)
    根据条件更新
    int
    updateBy(T bean, boolean updateNotNull, boolean optimisticLock, String where, Object... args)
    根据条件更新
    int
    updateBy(T bean, ConditionHandle<T> cond)
    根据条件更新
    int
    updateBy(T bean, Wrapper where)
    根据条件更新
    int
    updateBy(T bean, String where, Object... args)
    根据条件更新
    int
    updateByBean(T bean, boolean updateNotNull, boolean optimisticLock, String where)
    根据实体类字段条件更新
    int
    updateByBean(T bean, boolean updateNotNull, boolean optimisticLock, String where, Column... filterColumns)
    根据实体类字段条件更新
    <R> int
    updateByBean(T bean, boolean updateNotNull, boolean optimisticLock, String where, ColumnFun<T,R>[] filterColumns)
    根据实体类字段条件更新
    int
    updateByBean(T bean, String where)
    根据实体类字段条件更新
    int
    根据实体类id条件更新
    int
    updateByBeanId(T bean, boolean updateNotNull, boolean optimisticLock)
    根据实体类id条件更新
    int
    updateByBeanId(T bean, boolean updateNotNull, boolean optimisticLock, Column... filterColumns)
    根据实体类id条件更新
    <R> int
    updateByBeanId(T bean, boolean updateNotNull, boolean optimisticLock, ColumnFun<T,R>... filterColumns)
    根据实体类id条件更新
    int
    updateById(T bean, ID id)
    根据id条件更新
    int
    updateById(T bean, ID id, boolean updateNotNull, boolean optimisticLock)
    根据id条件更新
    int
    updateById(T bean, ID id, boolean updateNotNull, boolean optimisticLock, Column... filterColumns)
    根据实体类id条件更新
    <R> int
    updateById(T bean, ID id, boolean updateNotNull, boolean optimisticLock, ColumnFun<T,R>... filterColumns)
    根据实体类id条件更新
  • 方法详细资料

    • updateById

      int updateById(T bean, ID id)
      根据id条件更新
      参数:
      bean - 更新的bean实体
      id - id条件
      返回:
    • updateById

      int updateById(T bean, ID id, boolean updateNotNull, boolean optimisticLock)
      根据id条件更新
      参数:
      bean - 更新的bean实体
      id - id条件
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      返回:
    • updateById

      int updateById(T bean, ID id, boolean updateNotNull, boolean optimisticLock, Column... filterColumns)
      根据实体类id条件更新
      参数:
      bean - 更新的bean实体
      id - id条件
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      filterColumns - 过滤不需更新的字段
      返回:
    • updateById

      <R> int updateById(T bean, ID id, boolean updateNotNull, boolean optimisticLock, ColumnFun<T,R>... filterColumns)
      根据实体类id条件更新
      参数:
      bean - 更新的bean实体
      id - id条件
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      filterColumns - 过滤不需更新的字段
      返回:
    • updateByBeanId

      int updateByBeanId(T bean)
      根据实体类id条件更新
      参数:
      bean - 更新的bean实体
      返回:
    • updateByBeanId

      int updateByBeanId(T bean, boolean updateNotNull, boolean optimisticLock)
      根据实体类id条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      返回:
    • updateByBeanId

      int updateByBeanId(T bean, boolean updateNotNull, boolean optimisticLock, Column... filterColumns)
      根据实体类id条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      filterColumns - 过滤不需更新的字段
      返回:
    • updateByBeanId

      <R> int updateByBeanId(T bean, boolean updateNotNull, boolean optimisticLock, ColumnFun<T,R>... filterColumns)
      根据实体类id条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      filterColumns - 过滤不需更新的字段
      返回:
    • updateBy

      int updateBy(T bean, String where, Object... args)
      根据条件更新
      参数:
      bean - 更新的bean实体
      where - 条件字符串表达式
      args - 条件参数
      返回:
    • updateBy

      int updateBy(T bean, boolean updateNotNull, boolean optimisticLock, String where, Object... args)
      根据条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      where - 条件字符串表达式
      args - 条件参数
      返回:
    • updateBy

      int updateBy(T bean, Wrapper where)
      根据条件更新
      参数:
      bean - 更新的bean实体
      where - 条件包装器
      返回:
    • updateBy

      int updateBy(T bean, ConditionHandle<T> cond)
      根据条件更新
      参数:
      bean - 更新的bean实体
      cond - Lambda条件
      返回:
    • updateBy

      int updateBy(T bean, boolean updateNotNull, boolean optimisticLock, Wrapper wrapper)
      根据条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      wrapper - 条件包装器
      返回:
    • updateBy

      int updateBy(T bean, boolean updateNotNull, boolean optimisticLock, ConditionHandle<T> cond)
      根据条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      cond - Lambda条件
      返回:
    • updateBy

      int updateBy(T bean, boolean updateNotNull, boolean optimisticLock, Wrapper wrapper, Column... filterColumns)
      根据条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      wrapper - Lambda条件
      filterColumns - 过滤不需更新的字段
      返回:
    • updateBy

      int updateBy(T bean, boolean updateNotNull, boolean optimisticLock, ConditionHandle<T> cond, Column... filterColumns)
      根据条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      cond - Lambda条件
      filterColumns - 过滤不需更新的字段
      返回:
    • updateBy

      <R> int updateBy(T bean, boolean updateNotNull, boolean optimisticLock, Wrapper wrapper, ColumnFun<T,R>... filterColumns)
      根据条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      wrapper - 条件包装器
      filterColumns - 过滤不需更新的字段
      返回:
    • updateBy

      <R> int updateBy(T bean, boolean updateNotNull, boolean optimisticLock, ConditionHandle<T> cond, ColumnFun<T,R>... filterColumns)
      根据条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      cond - Lambda条件
      filterColumns - 过滤不需更新的字段
      返回:
    • updateBy

      int updateBy(T bean, boolean updateNotNull, boolean optimisticLock, Column[] filterColumns, String where, Object... args)
      根据条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      filterColumns - 过滤不需更新的字段
      where - 条件字符串表达式
      args - 条件参数
      返回:
    • updateByBean

      int updateByBean(T bean, String where)
      根据实体类字段条件更新
      参数:
      bean - 更新的bean实体
      where - 条件字符串表达式
      返回:
    • updateByBean

      int updateByBean(T bean, boolean updateNotNull, boolean optimisticLock, String where)
      根据实体类字段条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      where - 条件字符串表达式
      返回:
    • updateByBean

      int updateByBean(T bean, boolean updateNotNull, boolean optimisticLock, String where, Column... filterColumns)
      根据实体类字段条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      where - 条件字符串表达式
      filterColumns - 过滤不需更新的字段
      返回:
    • updateByBean

      <R> int updateByBean(T bean, boolean updateNotNull, boolean optimisticLock, String where, ColumnFun<T,R>[] filterColumns)
      根据实体类字段条件更新
      参数:
      bean - 更新的bean实体
      updateNotNull - 是否仅更新不为null的字段
      optimisticLock - 是否使用乐观锁
      where - 条件字符串表达式
      filterColumns - 过滤不需更新的字段
      返回:
    • update

      int update(Update<T> update)
      更新(where条件为空会抛异常,因为更新全部非常危险)
      参数:
      update - 更新对象
      返回:
    • update

      int update(Update<T> update, boolean ignore)
      更新
      参数:
      update - 更新对象
      ignore - 如果为true则不指定where条件也能执行,false则抛异常
      返回: