Class H2Database

java.lang.Object
org.eclipse.dirigible.database.h2.H2Database

public class H2Database extends Object
H2 Database adapter.
  • Field Details

    • NAME

      public static final String NAME
      The Constant TYPE.
      See Also:
    • TYPE

      public static final String TYPE
      The Constant TYPE.
      See Also:
    • DIRIGIBLE_DATABASE_H2_ROOT_FOLDER

      public static final String DIRIGIBLE_DATABASE_H2_ROOT_FOLDER
      The Constant DIRIGIBLE_DATABASE_H2_ROOT_FOLDER.
      See Also:
    • DIRIGIBLE_DATABASE_H2_ROOT_FOLDER_DEFAULT

      public static final String DIRIGIBLE_DATABASE_H2_ROOT_FOLDER_DEFAULT
      The Constant DIRIGIBLE_DATABASE_H2_ROOT_FOLDER_DEFAULT.
      See Also:
  • Constructor Details

    • H2Database

      public H2Database() throws SQLException
      Constructor with default root folder - user.dir
      Throws:
      SQLException - in case the database cannot be created
    • H2Database

      public H2Database(String rootFolder) throws SQLException
      Constructor with root folder parameter.
      Parameters:
      rootFolder - the root folder
      Throws:
      SQLException - in case the database cannot be created
  • Method Details

    • initialize

      public void initialize()
      Initialize.
    • getDataSource

      public DataSource getDataSource(String name) throws SQLException
      Gets the data source.
      Parameters:
      name - the name
      Returns:
      the data source
      Throws:
      SQLException
    • getName

      public String getName()
      Gets the name.
      Returns:
      the name
    • getType

      public String getType()
      Gets the type.
      Returns:
      the type
    • createDataSource

      protected DataSource createDataSource(String name) throws SQLException
      Creates the data source.
      Parameters:
      name - the name
      Returns:
      the data source
      Throws:
      SQLException
    • getDataSources

      public Map<String,DataSource> getDataSources()
      Gets the data sources.
      Returns:
      the data sources