Package org.compiere.db
Class Database
java.lang.Object
org.compiere.db.Database
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AdempiereDatabase
getDatabase
(String type) Get database adapter by database type.static AdempiereDatabase
getDatabaseFromURL
(String url) Get Database adapter by URL string.static String[]
static String
isValidIdentifier
(String identifier) Apply common validations for database identifier.
-
Field Details
-
DB_ORACLE
Oracle ID -
DB_POSTGRESQL
PostgreSQL ID -
CONNECTION_TIMEOUT
public static int CONNECTION_TIMEOUTConnection Timeout in seconds -
DB_ORACLE_DEFAULT_PORT
public static final int DB_ORACLE_DEFAULT_PORTDefault Port- See Also:
-
DB_ORACLE_DEFAULT_CM_PORT
public static final int DB_ORACLE_DEFAULT_CM_PORTDefault Connection Manager Port- See Also:
-
DB_POSTGRESQL_DEFAULT_PORT
public static final int DB_POSTGRESQL_DEFAULT_PORTDefault Port- See Also:
-
-
Constructor Details
-
Database
public Database()
-
-
Method Details
-
getDatabase
Get database adapter by database type.- Parameters:
type
-- Returns:
- database adapter
-
getDatabaseNames
- Returns:
- array of supported database name
-
getDatabaseFromURL
Get Database adapter by URL string.- Parameters:
url
- JDBC connection url- Returns:
- iDempiere Database Adapter
-
isValidIdentifier
Apply common validations for database identifier.- Parameters:
identifier
- String- Returns:
- error-code or null (if no error)
-