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 Details

    • 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:
    • DB_ORACLE_DEFAULT_CM_PORT

      public static final int DB_ORACLE_DEFAULT_CM_PORT
      Default Connection Manager Port
      See Also:
    • DB_POSTGRESQL_DEFAULT_PORT

      public static final int DB_POSTGRESQL_DEFAULT_PORT
      Default Port
      See Also:
  • Constructor Details

    • Database

      public Database()
  • Method Details

    • getDatabase

      public static AdempiereDatabase getDatabase(String type)
      Get database adapter by database type.
      Parameters:
      type -
      Returns:
      database adapter
    • getDatabaseNames

      public static String[] getDatabaseNames()
      Returns:
      array of supported database name
    • getDatabaseFromURL

      public static AdempiereDatabase getDatabaseFromURL(String url)
      Get Database adapter by URL string.
      Parameters:
      url - JDBC connection url
      Returns:
      iDempiere Database Adapter
    • isValidIdentifier

      public static String isValidIdentifier(String identifier)
      Apply common validations for database identifier.
      Parameters:
      identifier - String
      Returns:
      error-code or null (if no error)