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

org.fluentjdbc.DbContextUpdateBuilder Maven / Gradle / Ivy

There is a newer version: 0.5.3
Show newest version
package org.fluentjdbc;

import java.util.Collection;

public class DbContextUpdateBuilder implements DatabaseUpdateable {

    private DbTableContext tableContext;
    private DatabaseUpdateBuilder updateBuilder;

    public DbContextUpdateBuilder(DbTableContext tableContext, DatabaseUpdateBuilder updateBuilder) {
        this.tableContext = tableContext;
        this.updateBuilder = updateBuilder;
    }

    @Override
    public DbContextUpdateBuilder setFields(Collection fields, Collection values) {
        updateBuilder.setFields(fields, values);
        return this;
    }

    @Override
    public DbContextUpdateBuilder setField(String field, Object value) {
        updateBuilder.setField(field, value);
        return this;
    }

    public int execute() {
        return updateBuilder.execute(tableContext.getConnection());
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy