Package org.compiere.db
Class Database
- java.lang.Object
-
- org.compiere.db.Database
-
public class Database extends Object
General Database Constants and Utilities- Version:
- $Id: Database.java,v 1.3 2006/07/30 00:55:13 jjanke Exp $
- Author:
- Jorg Janke
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONNECTION_TIMEOUT
Connection Timeout in secondsstatic String
DB_ORACLE
Oracle IDstatic int
DB_ORACLE_DEFAULT_CM_PORT
Default Connection Manager Portstatic int
DB_ORACLE_DEFAULT_PORT
Default Portstatic String
DB_POSTGRESQL
PostgreSQL IDstatic int
DB_POSTGRESQL_DEFAULT_PORT
Default Port
-
Constructor Summary
Constructors Constructor Description Database()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AdempiereDatabase
getDatabase(String type)
Get Database by database Id.static AdempiereDatabase
getDatabaseFromURL(String url)
Get Database Driver by url string.static String[]
getDatabaseNames()
static String
isValidIdentifier(String identifier)
Apply common validations for database object names
-
-
-
Field Detail
-
DB_ORACLE
public static String DB_ORACLE
Oracle ID
-
DB_POSTGRESQL
public static String DB_POSTGRESQL
PostgreSQL ID
-
CONNECTION_TIMEOUT
public static int CONNECTION_TIMEOUT
Connection Timeout in seconds
-
DB_ORACLE_DEFAULT_PORT
public static final int DB_ORACLE_DEFAULT_PORT
Default Port- See Also:
- Constant Field Values
-
DB_ORACLE_DEFAULT_CM_PORT
public static final int DB_ORACLE_DEFAULT_CM_PORT
Default Connection Manager Port- See Also:
- Constant Field Values
-
DB_POSTGRESQL_DEFAULT_PORT
public static final int DB_POSTGRESQL_DEFAULT_PORT
Default Port- See Also:
- Constant Field Values
-
-
Method Detail
-
getDatabase
public static AdempiereDatabase getDatabase(String type)
Get Database by database Id.- Returns:
- database
-
getDatabaseNames
public static String[] getDatabaseNames()
-
getDatabaseFromURL
public static AdempiereDatabase getDatabaseFromURL(String url)
Get Database Driver by url string. Access to database specific functionality.- Parameters:
url
- JDBC connection url- Returns:
- iDempiere Database Driver
-
-