package com.msksbr.SQL;

public class UserInfo {
    private String url;
    private Integer port;
    private String database;
    private String username;
    private String password;
    private Boolean encrypted;

    public UserInfo(String url, Integer port, String database, String username, String password,boolean encrypted) {
        this.url = url;
        this.port = port;
        this.database = database;
        this.username = username;
        this.password = password;
        this.encrypted = encrypted;
    }

    public String GetUserInfo(){
        String LoginURL;
        LoginURL = "jdbc:sqlserver://";
        LoginURL=LoginURL+url;
        LoginURL=LoginURL+":"+port.toString();
        LoginURL=LoginURL+";databaseName="+database;
        LoginURL=LoginURL+";user="+username;
        LoginURL=LoginURL+";password="+password;
        LoginURL=LoginURL+";encrypt="+encrypted.toString().toLowerCase();
        return LoginURL;
    }
}
