package com.atlassian.stash.internal.jdbc;

import javax.annotation.Nonnull;

public class SimpleDataSourceConfiguration implements DataSourceConfiguration {

    private final String driverClassName;
    private final String url;
    private final String user;
    private final String password;

    public SimpleDataSourceConfiguration(String driverClassName, String url, String user, String password) {
        this.driverClassName = driverClassName;
        this.url = url;
        this.user = user;
        this.password = password;
    }

    @Nonnull
    @Override
    public String getDriverClassName() {
        return driverClassName;
    }

    @Nonnull
    @Override
    public String getPassword() {
        return password;
    }

    @Nonnull
    @Override
    public String getUrl() {
        return url;
    }

    @Nonnull
    @Override
    public String getUser() {
        return user;
    }

    @Override
    public String toString() {
        return "DataSourceConfiguration{" +
               "driverClassName='" + driverClassName + '\'' +
               ", url='" + url + '\'' +
               ", user='" + user + '\'' +
               '}';
    }
}
