com.kenshoo.pl.data.UpdateRecordCommand 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.
                
             The newest version!
        
        package com.kenshoo.pl.data;
import com.kenshoo.jooq.DataTable;
import org.jooq.Record;
import org.jooq.TableField;
public class UpdateRecordCommand extends AbstractRecordCommand {
    private final DatabaseId id;
    public UpdateRecordCommand(DataTable table, DatabaseId id) {
        super(table);
        this.id = id;
    }
    /**
     * Convenience constructor for tables with integer ID
     */
    public UpdateRecordCommand(DataTable table, int id) {
        super(table);
        TableField primaryKeyField = getPrimaryKeyField(table, Integer.class);
        //noinspection unchecked
        this.id = DatabaseId.create((TableField) primaryKeyField, id);
    }
    /**
     * Convenience constructor for tables with bigint ID
     */
    public UpdateRecordCommand(DataTable table, long id) {
        super(table);
        TableField primaryKeyField = getPrimaryKeyField(table, Long.class);
        //noinspection unchecked
        this.id = DatabaseId.create((TableField) primaryKeyField, id);
    }
    public DatabaseId getId() {
        return id;
    }
}
        © 2015 - 2025 Weber Informatics LLC | Privacy Policy