com.kenshoo.pl.FluidPersistenceCmdBuilder 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;
import com.kenshoo.pl.entity.ChangeEntityCommand;
import com.kenshoo.pl.entity.EntityField;
import com.kenshoo.pl.entity.EntityType;
import com.kenshoo.pl.entity.internal.MissingChildrenSupplier;
import com.kenshoo.pl.entity.spi.FieldValueSupplier;
public class FluidPersistenceCmdBuilder>{
public ChangeEntityCommand get() {
return cmd;
}
private final ChangeEntityCommand cmd;
public FluidPersistenceCmdBuilder(ChangeEntityCommand cmd) {
this.cmd = cmd;
}
public static > FluidPersistenceCmdBuilder fluid(ChangeEntityCommand cmd) {
return new FluidPersistenceCmdBuilder<>(cmd);
}
public FluidPersistenceCmdBuilder with(EntityField field, T value) {
cmd.set(field, value);
return this;
}
public FluidPersistenceCmdBuilder with(EntityField field, FieldValueSupplier valueSupplier) {
cmd.set(field, valueSupplier);
return this;
}
public > FluidPersistenceCmdBuilder withChild(ChangeEntityCommand childCmd) {
cmd.addChild(childCmd);
return this;
}
public > FluidPersistenceCmdBuilder withChild(FluidPersistenceCmdBuilder childCmd) {
cmd.addChild(childCmd.get());
return this;
}
public > FluidPersistenceCmdBuilder with(MissingChildrenSupplier s) {
cmd.add(s);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy