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

org.fluentjdbc.DbBulkUpdateContext Maven / Gradle / Ivy

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

import java.util.function.Function;

public class DbBulkUpdateContext implements
        DatabaseBulkQueriable>, DatabaseBulkUpdateable> {

    private final DbTableContext tableContext;
    private final DatabaseBulkUpdateBuilder builder;

    public DbBulkUpdateContext(DbTableContext tableContext, DatabaseBulkUpdateBuilder builder) {
        this.tableContext = tableContext;
        this.builder = builder;
    }

    @Override
    public DbBulkUpdateContext where(String field, Function value) {
        return build(builder.where(field, value));
    }

    @Override
    public DbBulkUpdateContext setField(String fieldName, Function transformer) {
        return build(builder.setField(fieldName, transformer));
    }

    private DbBulkUpdateContext build(DatabaseBulkUpdateBuilder builder) {
        return this;
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy