public class FieldMatcher extends Object
构造器和说明 |
---|
FieldMatcher() |
限定符和类型 | 方法和说明 |
---|---|
static FieldMatcher |
create(boolean ignoreId)
仅配置是否忽略@Id标注的属性,然后生成实例
|
Pattern |
getActived()
获取可用字段/属性的正则表达式
|
Pattern |
getLocked()
获取不可用字段/属性的正则表达式
|
boolean |
isIgnoreBlankStr() |
boolean |
isIgnoreDate()
是否忽略Date及其子类的属性值
|
boolean |
isIgnoreId()
是否忽略@Id标注的属性,默认忽略
|
boolean |
isIgnoreName()
是否忽略@Name标注的属性,默认是false
|
boolean |
isIgnoreNull()
是否忽略控制
|
boolean |
isIgnorePk()
是否忽略@Pk所引用的属性,默认是false
|
boolean |
isIgnoreZero()
是否忽略零值
|
static FieldMatcher |
make(String actived,
String locked,
boolean ignoreNull)
构建一个字段匹配器.
|
static FieldMatcher |
make(String actived,
String locked,
boolean ignoreNull,
boolean ignoreZero,
boolean ignoreDate,
boolean ignoreId,
boolean ignoreName,
boolean ignorePk)
构建一个字段匹配器.
|
static FieldMatcher |
make(String actived,
String locked,
boolean ignoreNull,
boolean ignoreZero,
boolean ignoreDate,
boolean ignoreId,
boolean ignoreName,
boolean ignorePk,
boolean ignoreBlankStr)
构建一个字段匹配器.
|
boolean |
match(String str)
匹配顺序 locked -- actived-- ignoreNull
|
FieldMatcher |
setActived(String actived)
设置过滤可用字段/属性的正则表达式
|
FieldMatcher |
setIgnoreBlankStr(boolean ignoreBlankStr) |
FieldMatcher |
setIgnoreDate(boolean ignoreDate)
设置是否忽略Date及其子类的属性值
|
FieldMatcher |
setIgnoreId(boolean ignoreId)
设置是否忽略@Id标注的属性
|
FieldMatcher |
setIgnoreName(boolean ignoreName)
设置是否忽略@Name标注的属性
|
FieldMatcher |
setIgnoreNull(boolean ignoreNull)
设置是否忽略空值
|
FieldMatcher |
setIgnorePk(boolean ignorePk)
设置是否忽略@Pk所引用的属性
|
FieldMatcher |
setIgnoreZero(boolean ignoreZero)
设置是否忽略零值
|
FieldMatcher |
setLocked(String locked)
设置过滤不可用字段/属性的正则表达式
|
static FieldMatcher |
simple(String... fields) |
public static FieldMatcher make(String actived, String locked, boolean ignoreNull)
actived
- 需要保留的字段,必须是合法的正则表达式,可以为nulllocked
- 需要忽略的字段,必须是合法的正则表达式,可以为nullignoreNull
- 是否忽略空值public static FieldMatcher create(boolean ignoreId)
ignoreId
- 是否忽略@Id标注的属性public static FieldMatcher make(String actived, String locked, boolean ignoreNull, boolean ignoreZero, boolean ignoreDate, boolean ignoreId, boolean ignoreName, boolean ignorePk)
actived
- 需要保留的字段,必须是合法的正则表达式,可以为nulllocked
- 需要忽略的字段,必须是合法的正则表达式,可以为nullignoreNull
- 是否忽略空值ignoreZero
- 是否忽略零值,仅针对数值类型ignoreDate
- 是否忽略java.util.Date及其子类的属性ignoreId
- 是否忽略@Id标注的属性ignoreName
- 是否忽略@Name标注的属性ignorePk
- 是否忽略@Pk引用的属性public static FieldMatcher make(String actived, String locked, boolean ignoreNull, boolean ignoreZero, boolean ignoreDate, boolean ignoreId, boolean ignoreName, boolean ignorePk, boolean ignoreBlankStr)
actived
- 需要保留的字段,必须是合法的正则表达式,可以为nulllocked
- 需要忽略的字段,必须是合法的正则表达式,可以为nullignoreNull
- 是否忽略空值ignoreZero
- 是否忽略零值,仅针对数值类型ignoreDate
- 是否忽略java.util.Date及其子类的属性ignoreId
- 是否忽略@Id标注的属性ignoreName
- 是否忽略@Name标注的属性ignorePk
- 是否忽略@Pk引用的属性public boolean match(String str)
str
- 需要匹配的字段名称public boolean isIgnoreNull()
public FieldMatcher setIgnoreNull(boolean ignoreNull)
ignoreNull
- 是否忽略空值属性public Pattern getActived()
public Pattern getLocked()
public FieldMatcher setActived(String actived)
actived
- 正则表达式public FieldMatcher setLocked(String locked)
locked
- 正则表达式public boolean isIgnoreZero()
public FieldMatcher setIgnoreZero(boolean ignoreZero)
ignoreZero
- 是否忽略零值public boolean isIgnoreDate()
public FieldMatcher setIgnoreDate(boolean ignoreDate)
ignoreDate
- 是否忽略public boolean isIgnoreId()
public FieldMatcher setIgnoreId(boolean ignoreId)
ignoreId
- 是否忽略public boolean isIgnoreName()
public FieldMatcher setIgnoreName(boolean ignoreName)
ignoreName
- 是否忽略public boolean isIgnorePk()
public FieldMatcher setIgnorePk(boolean ignorePk)
ignorePk
- 是否忽略public boolean isIgnoreBlankStr()
public FieldMatcher setIgnoreBlankStr(boolean ignoreBlankStr)
public static FieldMatcher simple(String... fields)
Copyright © 2017. All rights reserved.