com.kenshoo.pl.data.AbstractRecordCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of persistence-layer Show documentation
Show all versions of persistence-layer Show documentation
A Java persistence layer based on JOOQ for high performance and business flow support.
package com.kenshoo.pl.data;
import com.kenshoo.jooq.DataTable;
import gnu.trove.map.hash.THashMap;
import org.jooq.Field;
import org.jooq.Record;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
public abstract class AbstractRecordCommand {
private final DataTable table;
private final Map, Object> values = new THashMap<>();
protected AbstractRecordCommand(DataTable table) {
this.table = table;
}
public void set(Field field, T value) {
values.put(field, value);
}
public T get(Field field) {
return (T) values.get(field);
}
public Stream> getFields() {
return values.keySet().stream();
}
public Stream