类 FieldFilter

java.lang.Object
cool.scx.data.mysql_x.FieldFilter

public final class FieldFilter extends Object
列过滤器
版本:
0.1.3
作者:
scx567888
  • 方法详细资料

    • ofIncluded

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

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

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

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

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

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

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

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

      public FieldFilter addIncluded(String... fieldNames)
      添加 白名单
      参数:
      fieldNames - 包含的列名 (注意是 java 字段名称 ,不是 数据库 字段名称)
      返回:
      this 方便链式调用
    • addExcluded

      public FieldFilter addExcluded(String... fieldNames)
      添加 黑名单
      参数:
      fieldNames - 包含的列名 (注意是 java 字段名称 ,不是 数据库 字段名称)
      返回:
      this 方便链式调用
    • removeIncluded

      public FieldFilter removeIncluded(String... fieldNames)
      移除白名单
      参数:
      fieldNames - 包含的列名 (注意是 java 字段名称 ,不是 数据库 字段名称)
      返回:
      this 方便链式调用
    • removeExcluded

      public FieldFilter removeExcluded(String... fieldNames)
      移除黑名单
      参数:
      fieldNames - 包含的列名 (注意是 java 字段名称 ,不是 数据库 字段名称)
      返回:
      this 方便链式调用
    • clear

      public FieldFilter clear()
      清除所有 包含类型的列
      返回:
      this 方便链式调用
    • filterMode

      public FieldFilter.FilterMode filterMode()
      获取当前模式
      返回:
      mode 分三种 禁用 : 0 ,包含模式 : 1 排除模式 : 2
    • fieldNames

      public Set<String> fieldNames()
    • excludeIfFieldValueIsNull

      public boolean excludeIfFieldValueIsNull()