Class DbAdaptorFactory
- java.lang.Object
-
- ru.curs.celesta.dbutils.adaptors.configuration.DbAdaptorFactory
-
public final class DbAdaptorFactory extends Object
DB adaptor builder.
Depending on DB type the following descendants ofDBAdaptor
are returned:- H2 -
H2Adaptor
- Postgre SQL -
PostgresAdaptor
- MS SQL -
MSSQLAdaptor
- Oracle -
OraAdaptor
- H2 -
-
-
Constructor Summary
Constructors Constructor Description DbAdaptorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DBAdaptor
createDbAdaptor()
Builds DB adaptor for concrete DB type.DbAdaptorFactory
setConnectionPool(ConnectionPool connectionPool)
Sets Connection pool.DbAdaptorFactory
setDbType(DBType dbType)
Sets DB type.DbAdaptorFactory
setDdlConsumer(DdlConsumer ddlConsumer)
Sets DDL Consumer.DbAdaptorFactory
setH2ReferentialIntegrity(boolean h2ReferentialIntegrity)
Whether referential integrity for H2 DB has to be switched on/off.
-
-
-
Method Detail
-
setDbType
public DbAdaptorFactory setDbType(DBType dbType)
Sets DB type.- Parameters:
dbType
- DB type- Returns:
this
-
setDdlConsumer
public DbAdaptorFactory setDdlConsumer(DdlConsumer ddlConsumer)
Sets DDL Consumer.- Parameters:
ddlConsumer
- DDL consumer- Returns:
-
setConnectionPool
public DbAdaptorFactory setConnectionPool(ConnectionPool connectionPool)
Sets Connection pool.- Parameters:
connectionPool
- connection pool- Returns:
-
setH2ReferentialIntegrity
public DbAdaptorFactory setH2ReferentialIntegrity(boolean h2ReferentialIntegrity)
Whether referential integrity for H2 DB has to be switched on/off.- Parameters:
h2ReferentialIntegrity
-true
- switch on,false
- switch off. Defaul value isfalse
.- Returns:
-
createDbAdaptor
public DBAdaptor createDbAdaptor()
Builds DB adaptor for concrete DB type.- Returns:
-
-