package net.alanmaxwell.sql;

public class SQLServerInfoJDBC
{
  public String netAddress = "";
  public String databaseName = "";
  public String dbUsername = "";
  public String dbPassword = "";
  public String hostProcess = "";
  public String databaseURL = "";
  boolean isTDS=false;

  public SQLServerInfoJDBC(String newNetAddress, String newDatabaseName,
                           String newDbUsername, String newDbPassword)
  {
    this.netAddress = newNetAddress;
    this.databaseName = newDatabaseName;
    this.dbUsername = newDbUsername;
    this.dbPassword = newDbPassword;

    this.databaseURL =
      "jdbc:microsoft:sqlserver://" + this.netAddress + ":1433;" +
      "DatabaseName=" + this.databaseName;
  };
  
  public SQLServerInfoJDBC(String newNetAddress, String newDatabaseName,
          String newDbUsername, String newDbPassword, boolean newIsTDS)
{
this.netAddress = newNetAddress;
this.databaseName = newDatabaseName;
this.dbUsername = newDbUsername;
this.dbPassword = newDbPassword;
this.isTDS=newIsTDS;
if (isTDS){
    this.databaseURL =
    "jdbc:jtds:sqlserver://"+this.netAddress + ":1433/" + this.databaseName;
} else {
this.databaseURL =
"jdbc:microsoft:sqlserver://" + this.netAddress + ":1433;" +
"DatabaseName=" + this.databaseName;
}
};
  
  
  public SQLServerInfoJDBC(String newNetAddress, String newDatabaseName,
          String newDbUsername, String newDbPassword, String newHostProcess)
{
this.netAddress = newNetAddress;
this.databaseName = newDatabaseName;
this.dbUsername = newDbUsername;
this.dbPassword = newDbPassword;
this.hostProcess = newHostProcess;

this.databaseURL =
"jdbc:microsoft:sqlserver://" + this.netAddress + ":1433;" +
"DatabaseName=" + this.databaseName+";HostProcess="+this.hostProcess;
};
};
