D
- JdbcDatastore
typepublic static interface JdbcDatastore.Builder<D extends JdbcDatastore> extends com.holonplatform.core.datastore.DatastoreOperations.Builder<D,JdbcDatastore.Builder<D>>
JdbcDatastore
builder.Modifier and Type | Method and Description |
---|---|
JdbcDatastore.Builder<D> |
autoCommit(boolean autoCommit)
Deprecated.
Use transaction operations to manage connection auto-commit or provide a custom
JdbcConnectionHandler for more complex situations |
JdbcDatastore.Builder<D> |
connectionHandler(com.holonplatform.jdbc.JdbcConnectionHandler connectionHandler)
Set a custom
JdbcConnectionHandler to be used for Datastore JDBC connections handling. |
JdbcDatastore.Builder<D> |
database(com.holonplatform.jdbc.DatabasePlatform database)
Set the database platform to which the DataSource is connected.
|
JdbcDatastore.Builder<D> |
dataSource(DataSource dataSource)
Set the
DataSource to use. |
JdbcDatastore.Builder<D> |
dataSource(com.holonplatform.jdbc.DataSourceConfigProperties configuration)
Set the configuration property source to build the
DataSource to use with the Datastore. |
JdbcDatastore.Builder<D> |
dialect(SQLDialect dialect)
Set the dialect to use.
|
JdbcDatastore.Builder<D> |
dialect(String dialectClassName)
Set the fully qualified dialect class name to use as datastore dialect.
|
JdbcDatastore.Builder<D> |
identifierResolutionStrategy(IdentifierResolutionStrategy identifierResolutionStrategy)
Set the
IdentifierResolutionStrategy . |
JdbcDatastore.Builder<D> |
transactionFactory(JdbcTransactionFactory transactionFactory)
Set a custom
JdbcTransactionFactory to be used by the Datastore to create new transactions. |
<C extends com.holonplatform.core.datastore.DatastoreCommodity> |
withCommodity(JdbcDatastoreCommodityFactory<C> commodityFactory)
Register a
JdbcDatastoreCommodityFactory . |
JdbcDatastore.Builder<D> dataSource(DataSource dataSource)
DataSource
to use.dataSource
- DataSource to set (not null)JdbcDatastore.Builder<D> dataSource(com.holonplatform.jdbc.DataSourceConfigProperties configuration)
DataSource
to use with the Datastore.configuration
- DataSource configuration properties (not null)JdbcDatastore.Builder<D> database(com.holonplatform.jdbc.DatabasePlatform database)
If DataSourceConfigProperties
are provided, the database platform is obtained from the
DataSourceConfigProperties.PLATFORM
property or auto-detected by the datastore if the property is not
specified.
database
- Database platform to set (not null)JdbcDatastore.Builder<D> dialect(SQLDialect dialect)
If a DatabasePlatform
is provided (using database(DatabasePlatform)
or read/detected from
the DataSource configuration properties with dataSource(DataSourceConfigProperties)
), the datastore
tries to autodetect the dialect to use, if available.
dialect
- The dialect to set (not null)JdbcDatastore.Builder<D> dialect(String dialectClassName)
If a DatabasePlatform
is provided (using database(DatabasePlatform)
or read/detected from
the DataSource configuration properties with dataSource(DataSourceConfigProperties)
), the datastore
tries to autodetect the dialect to use, if available.
dialectClassName
- The dialect class name to set (not null)@Deprecated JdbcDatastore.Builder<D> autoCommit(boolean autoCommit)
JdbcConnectionHandler
for more complex situationstrue
)autoCommit
- Whether to set connections auto-commitJdbcDatastore.Builder<D> connectionHandler(com.holonplatform.jdbc.JdbcConnectionHandler connectionHandler)
JdbcConnectionHandler
to be used for Datastore JDBC connections handling.connectionHandler
- The connection handler to set (not null)JdbcDatastore.Builder<D> transactionFactory(JdbcTransactionFactory transactionFactory)
JdbcTransactionFactory
to be used by the Datastore to create new transactions.transactionFactory
- The transaction factory to set (not null)JdbcDatastore.Builder<D> identifierResolutionStrategy(IdentifierResolutionStrategy identifierResolutionStrategy)
IdentifierResolutionStrategy
.
The identifier resolution strategy is used by the datastore to perform operations which involve a
PropertyBox
and for which the PropertyBox
identifier properties are required to match the
PropertyBox
data with the database table primary key.
identifierResolutionStrategy
- The identifier resolution strategy to set (not null)<C extends com.holonplatform.core.datastore.DatastoreCommodity> JdbcDatastore.Builder<D> withCommodity(JdbcDatastoreCommodityFactory<C> commodityFactory)
JdbcDatastoreCommodityFactory
.C
- Commodity typecommodityFactory
- The factory to register (not null)Copyright © 2019 The Holon Platform. All rights reserved.