All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kenshoo.pl.FluidPersistenceCmdBuilder Maven / Gradle / Ivy

Go to download

A Java persistence layer based on JOOQ for high performance and business flow support.

There is a newer version: 0.1.121-jooq-3.16.3
Show newest version
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