Class DatabaseListener

java.lang.Object
org.apache.sis.internal.metadata.sql.Initializer
org.apache.sis.internal.referencing.DatabaseListener

public final class DatabaseListener extends Initializer
Invoked when a new database is created or when the data source changed. This listener is registered in the following file:
Since:
0.7
Version:
0.7
  • Constructor Details

    • DatabaseListener

      public DatabaseListener()
      To be invoked by refection.
  • Method Details

    • createSchema

      protected void createSchema(Connection connection) throws SQLException
      Invoked when a new database is created. The current Apache SIS version does not create the EPSG database immediately. We rather rely on automatic installation by EPSGInstaller the first time that a CRS is requested. However, we may revisit this policy in a future SIS version.
      Specified by:
      createSchema in class Initializer
      Parameters:
      connection - connection to the empty database.
      Throws:
      SQLException - if an error occurred while populating the database.
    • dataSourceChanged

      protected void dataSourceChanged()
      Invoked when the data source changed.
      Specified by:
      dataSourceChanged in class Initializer