程序包 cool.scx.dao

类 UpdateFilter


public final class UpdateFilter extends ColumnInfoFilter<UpdateFilter>
更新及保存数据是的字段过滤器 (注意 excludeIfFieldValueIsNull 在 批量保存时无效)
版本:
0.1.3
作者:
scx567888
  • 方法详细资料

    • ofIncluded

      public static UpdateFilter ofIncluded()
      启用白名单模式 (当一个实体类所对应的 field 的值为 null 时, 会将此 field 所对应的列排除, 详情请看 ofIncluded(boolean))
      返回:
      a
    • ofExcluded

      public static UpdateFilter ofExcluded()
      启用黑名单模式 (当一个实体类所对应的 field 的值为 null 时, 会将此 field 所对应的列排除, 详情请看 ofExcluded(boolean))
      返回:
      a
    • ofIncluded

      public static UpdateFilter ofIncluded(boolean excludeIfFieldValueIsNull)
      启用白名单模式
      参数:
      excludeIfFieldValueIsNull - 当一个实体类所对应的 field 的值为 null 时, 是否将此 field 所对应的列排除
      返回:
      a
    • ofExcluded

      public static UpdateFilter ofExcluded(boolean excludeIfFieldValueIsNull)
      启动黑名单模式
      参数:
      excludeIfFieldValueIsNull - 当一个实体类所对应的 field 的值为 null 时, 是否将此 field 所对应的列排除
      返回:
      a
    • ofIncluded

      public static UpdateFilter ofIncluded(String... fieldNames)
      白名单模式
      参数:
      fieldNames - a
      返回:
      a
    • ofExcluded

      public static UpdateFilter ofExcluded(String... fieldNames)
      黑名单模式
      参数:
      fieldNames - a
      返回:
      a
    • ofIncluded

      public static UpdateFilter ofIncluded(boolean excludeIfFieldValueIsNull, String... fieldNames)
      白名单模式
      参数:
      excludeIfFieldValueIsNull - a
      fieldNames - a
      返回:
      a
    • ofExcluded

      public static UpdateFilter ofExcluded(boolean excludeIfFieldValueIsNull, String... fieldNames)
      黑名单模式
      参数:
      excludeIfFieldValueIsNull - a
      fieldNames - a
      返回:
      a
    • filter

      public ColumnInfo[] filter(Object entity, ColumnInfo... scxDaoColumnInfos)
      过滤
      参数:
      entity - a
      scxDaoColumnInfos - 带过滤的列表
      返回:
      过滤后的列表