Package de.xima.fc.dao.interfaces
Interface IConnectionCreator
-
- All Known Implementing Classes:
ConnectionCreator
public interface IConnectionCreatorCreates database connections on demand. Take care of closing the connections using try-with-resources.- Since:
- 8.6.0
- Author:
- Hannes John
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<Connection>getConnection()Opens a new connection, if available.EDatenbankTypgetDatenbankTyp()Returns the database type of the connection.intgetMaxConnections()Retrieves the number of maximum connections of the underlying connection pool.default IVorgangsDataSQLBuildergetVorgangsDataSQLBuilder()Returns the form record data SQL builder.
-
-
-
Method Detail
-
getConnection
Optional<Connection> getConnection() throws FcPersistenceException, SQLException
Opens a new connection, if available.- Returns:
- connection, if available
- Throws:
FcPersistenceException- if no connection can be establishedSQLException- if the database cannot be accessed
-
getMaxConnections
int getMaxConnections()
Retrieves the number of maximum connections of the underlying connection pool. This can be used for concurrency.- Returns:
- number of maximum connections
-
getDatenbankTyp
EDatenbankTyp getDatenbankTyp()
Returns the database type of the connection.- Returns:
- database type
-
getVorgangsDataSQLBuilder
default IVorgangsDataSQLBuilder getVorgangsDataSQLBuilder()
Returns the form record data SQL builder.- Returns:
- form record data SQL builder
-
-