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

org.neogroup.warp.data.query.UpdateQuery Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version

package org.neogroup.warp.data.query;

import org.neogroup.warp.data.query.conditions.ConditionGroup;
import org.neogroup.warp.data.query.traits.HasFields;
import org.neogroup.warp.data.query.traits.HasTable;
import org.neogroup.warp.data.query.traits.HasWhereConditions;

import java.util.HashMap;
import java.util.Map;

public class UpdateQuery extends Query implements
        HasTable,
        HasFields,
        HasWhereConditions {

    private String tableName;
    private Map fields;
    private ConditionGroup whereConditionGroup;

    public UpdateQuery() {
        this.tableName = null;
        this.fields = new HashMap<>();
        this.whereConditionGroup = new ConditionGroup();
    }

    @Override
    public String getTableName() {
        return tableName;
    }

    @Override
    public UpdateQuery setTableName(String tableName) {
        this.tableName = tableName;
        return this;
    }

    @Override
    public Map getFields() {
        return fields;
    }

    @Override
    public UpdateQuery setFields(Map fields) {
        this.fields = fields;
        return this;
    }

    @Override
    public ConditionGroup getWhereConditions() {
        return whereConditionGroup;
    }

    @Override
    public UpdateQuery setWhereConditions(ConditionGroup conditionGroup) {
        this.whereConditionGroup = conditionGroup;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy