Class 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 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
    • Constructor Detail

      • Database

        public Database()
    • 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
      • isValidIdentifier

        public static String isValidIdentifier​(String identifier)
        Apply common validations for database object names
        Parameters:
        identifier - String
        Returns:
        String error-code - null if not error