package com.atlassian.stash.internal.db;

import com.google.common.collect.ImmutableSet;

import java.util.Set;

public class DatabaseConstants {

    /**
     * The property name for the driver class to use to connect to the database
     */
    public static final String PROP_JDBC_DRIVER = "jdbc.driver";

    /**
     * The property name for the URL to use to connect to the database
     */
    public static final String PROP_JDBC_URL = "jdbc.url";

    /**
     * The property name for the username to use to connect to the database
     */
    public static final String PROP_JDBC_USER = "jdbc.user";

    /**
     * The property name for the password to use to connect to the database
     */
    public static final String PROP_JDBC_PASSWORD = "jdbc.password";

    /**
     * Handy set of JDBC properties
     * @since 3.8
     */
    public static final Set<String> PROPS_JDBC = ImmutableSet.of(
            DatabaseConstants.PROP_JDBC_DRIVER,
            DatabaseConstants.PROP_JDBC_URL,
            DatabaseConstants.PROP_JDBC_USER,
            DatabaseConstants.PROP_JDBC_PASSWORD
    );

    private DatabaseConstants() {
        throw new UnsupportedOperationException("Cannot instantiate " + getClass().getName());
    }
}
