Interface DatabaseObjectsFactory
-
- All Known Implementing Classes:
DefaultDatabaseObjectsFactory
public interface DatabaseObjectsFactoryFactory for creating connections and prepared statements
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclear()Free resourcesvoidinit(javax.sql.DataSource dataSource, ExtProperties properties)Initialize the factory with the DataSourceResourceLoader propertiesjava.sql.PreparedStatementprepareStatement(java.lang.String sql)Prepare a statementvoidreleaseStatement(java.lang.String sql, java.sql.PreparedStatement stmt)Releases a prepared statementdefault voidsetLogger(org.slf4j.Logger log)Set the logger to be used by the factory
-
-
-
Method Detail
-
init
void init(javax.sql.DataSource dataSource, ExtProperties properties) throws java.sql.SQLExceptionInitialize the factory with the DataSourceResourceLoader properties- Parameters:
dataSource- data source- Throws:
java.sql.SQLException
-
setLogger
default void setLogger(org.slf4j.Logger log)
Set the logger to be used by the factory- Parameters:
log-
-
prepareStatement
java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLExceptionPrepare a statement- Parameters:
sql- Statement SQL- Returns:
- prepared statement
- Throws:
java.sql.SQLException
-
releaseStatement
void releaseStatement(java.lang.String sql, java.sql.PreparedStatement stmt) throws java.sql.SQLExceptionReleases a prepared statement- Parameters:
sql- original sql querystmt- statement- Throws:
java.sql.SQLException
-
clear
default void clear()
Free resources
-
-