gu.sql2java.json.FieldTranformer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sql2java-base Show documentation
Show all versions of sql2java-base Show documentation
sql2java common class package
package gu.sql2java.json;
/**
* 字段值转换接口
* @author guyadong
* @since 3.32.0
*/
public interface FieldTranformer {
/**
* 修改指定字段的值
* @param clazz 类
* @param filedName 字段名
* @param value 字段值
* @return 返回修改后的值
*/
public Object transform(Class> clazz, String filedName,Object value);
static final class Identity implements FieldTranformer{
@Override
public Object transform(Class> clazz, String filedName, Object value) {
return value;
}};
static final class Null implements FieldTranformer {
@Override
public Object transform(Class> clazz, String filedName, Object value) {
return null;
}};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy