Class DatabaseListener
java.lang.Object
org.apache.sis.internal.metadata.sql.Initializer
org.apache.sis.internal.referencing.DatabaseListener
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
-
Field Summary
Fields inherited from class org.apache.sis.internal.metadata.sql.Initializer
DATABASE, JNDI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createSchema
(Connection connection) Invoked when a new database is created.protected void
Invoked when the data source changed.Methods inherited from class org.apache.sis.internal.metadata.sql.Initializer
connected, getDataSource, hasJNDI, setDefault, unspecified
-
Constructor Details
-
DatabaseListener
public DatabaseListener()To be invoked by refection.
-
-
Method Details
-
createSchema
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 byEPSGInstaller
the first time that a CRS is requested. However, we may revisit this policy in a future SIS version.- Specified by:
createSchema
in classInitializer
- 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 classInitializer
-