Package org.mybatis.generator.api
Interface ConnectionFactory
- All Known Implementing Classes:
JDBCConnectionFactory
public interface ConnectionFactory
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfigurationProperties
(Properties properties) Adds properties for this instance from any properties configured in the ConnectionFactory.Should return a connection to the database in use for this context.
-
Method Details
-
getConnection
Should return a connection to the database in use for this context. The generator will call this method only one time for each context. The generator will close the connection.- Returns:
- the connection
- Throws:
SQLException
- if there is some error obtaining the connection
-
addConfigurationProperties
Adds properties for this instance from any properties configured in the ConnectionFactory.This method will be called before any of the get methods.
- Parameters:
properties
- All properties from the configuration
-