public class DatabaseManager
extends java.lang.Object
DatabaseManager
class controls the databases of the n4e application.Modifier and Type | Field and Description |
---|---|
static int |
CLIENT |
static int |
DB2 |
int |
errCode
error code while initialisation.
|
java.lang.String |
errMess
error message while initialisation.
|
static int |
INIT_ERROR1 |
static int |
INIT_ERROR2 |
static int |
MSSQL |
static int |
MSSQL_JT |
static int |
MYSQL |
static int |
N4ECOM |
static int |
ORACLE |
static int |
URANUS |
Constructor and Description |
---|
DatabaseManager(java.lang.String prop_path,
java.lang.String log_path,
java.lang.String log_path_old,
boolean debug)
The constructor
DatabaseManager creates a new instance(object) of the class. |
Modifier and Type | Method and Description |
---|---|
static DatabaseConnectionSet |
getDatabaseConnectionSet(java.lang.String databaseSystem)
The method
getDatabaseConnectionSet returns the database connection set of the given database. |
static java.lang.String[] |
getDatabaseSystemNames()
The method
getDatabaseSystemNames returns a list of the current names of databases. |
static int[] |
getDatabaseSystemProducts()
The method
getDatabaseSystemProducts returns a list of the current product codes of databases. |
static boolean |
isOneDatabaseInstallation()
The method
isOneDatabaseInstallation returns true, if the database installation is done in one database. |
static void |
releaseAllConnections()
The method
releaseAllConnections release the connections of all databases. |
public int errCode
public java.lang.String errMess
public static final int ORACLE
public static final int DB2
public static final int MSSQL
public static final int MSSQL_JT
public static final int MYSQL
public static final int URANUS
public static final int N4ECOM
public static final int CLIENT
public static final int INIT_ERROR1
public static final int INIT_ERROR2
public DatabaseManager(java.lang.String prop_path, java.lang.String log_path, java.lang.String log_path_old, boolean debug) throws java.lang.Exception
DatabaseManager
creates a new instance(object) of the class.prop_path
- the path with the propertie file.log_path
- the path to log to.log_path_old
- the path of old database logs.debug
- if true.java.lang.Exception
- if errorpublic static java.lang.String[] getDatabaseSystemNames()
getDatabaseSystemNames
returns a list of the current names of databases.public static int[] getDatabaseSystemProducts()
getDatabaseSystemProducts
returns a list of the current product codes of databases.public static boolean isOneDatabaseInstallation()
isOneDatabaseInstallation
returns true, if the database installation is done in one database.public static DatabaseConnectionSet getDatabaseConnectionSet(java.lang.String databaseSystem)
getDatabaseConnectionSet
returns the database connection set of the given database.databaseSystem
- database Systempublic static void releaseAllConnections()
releaseAllConnections
release the connections of all databases.