/*
 * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 * WSO2 Inc. licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package org.wso2.carbon.event.simulator.core.internal.bean;

import java.util.List;

/**
 * DBSimulationDTO class contains configuration for database simulation.
 */
public class DBSimulationDTO extends StreamConfigurationDTO {

    private String driver;
    private String dataSourceLocation;
    private String username;
    private String password;
    private String tableName;
    private List<String> columnNames;


    public DBSimulationDTO() {
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public String getDataSourceLocation() {
        return dataSourceLocation;
    }

    public void setDataSourceLocation(String dataSourceLocation) {
        this.dataSourceLocation = dataSourceLocation;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public List<String> getColumnNames() {
        return columnNames;
    }

    public void setColumnNames(List<String> columns) {

        this.columnNames = columns;
    }

    @Override
    public String toString() {
        return getStreamConfiguration() +
                "\n driver : " + driver +
                "\n dataSourceLocation : " + dataSourceLocation +
                "\n username : " + username +
                "\n password : " + password +
                "\n tableName : " + tableName +
                "\n columnNames : " + columnNames + "\n";
    }
}
