This commit is contained in:
2024-09-08 14:21:47 +08:00
parent 5cd19b3512
commit a52581836d
47 changed files with 5383 additions and 0 deletions
@@ -0,0 +1,35 @@
package com.cym.bean;
import java.util.HashMap;
import java.util.Map;
import com.cym.reflection.ReflectionUtil;
import com.cym.reflection.SerializableFunction;
public class Update {
Map<String, Object> sets;
public Update() {
sets = new HashMap<String, Object>();
}
public Update set(String key, Object value) {
sets.put(key, value);
return this;
}
public <T, R> Update set(SerializableFunction<T, R> property, Object value) {
sets.put(ReflectionUtil.getFieldName(property), value);
return this;
}
public Map<String, Object> getSets() {
return sets;
}
public void setSets(Map<String, Object> sets) {
this.sets = sets;
}
}