45 lines
1.1 KiB
Java
45 lines
1.1 KiB
Java
|
package com.articles;
|
||
|
|
||
|
public class ParametresConnexion
|
||
|
{
|
||
|
public String Serveur = "http://canette.u-strasbg.fr";
|
||
|
public String Port = "3001";
|
||
|
public String Base = "v920";
|
||
|
public String Utilisateur = "dut";
|
||
|
public String Pwd = "dut";
|
||
|
public static final String CLASSE = "oracle.jdbc.driver.OracleDriver";
|
||
|
public static final String URL_BASE = "jdbc:oracle:thin:";
|
||
|
|
||
|
|
||
|
public ParametresConnexion( ParametresConnexion params )
|
||
|
{
|
||
|
this.CopierDepuis(params);
|
||
|
}
|
||
|
|
||
|
public ParametresConnexion(String serveur, String port, String base,
|
||
|
String utilisateur, String pwd)
|
||
|
{
|
||
|
this.Serveur = serveur;
|
||
|
this.Port = port;
|
||
|
this.Base = base;
|
||
|
this.Utilisateur = utilisateur;
|
||
|
this.Pwd = pwd;
|
||
|
}
|
||
|
|
||
|
|
||
|
public String getUrl()
|
||
|
{
|
||
|
return ParametresConnexion.URL_BASE + "@" + this.Serveur + ":" + this.Port + ":" + this.Base;
|
||
|
}
|
||
|
|
||
|
|
||
|
public void CopierDepuis( ParametresConnexion params )
|
||
|
{
|
||
|
this.Serveur = params.Serveur;
|
||
|
this.Port = params.Port;
|
||
|
this.Base = params.Base;
|
||
|
this.Utilisateur = params.Utilisateur;
|
||
|
this.Pwd = params.Pwd;
|
||
|
}
|
||
|
}
|