Package org.javers.repository.sql
Class SqlRepositoryBuilder
- java.lang.Object
-
- org.javers.core.AbstractContainerBuilder
-
- org.javers.repository.sql.SqlRepositoryBuilder
-
public class SqlRepositoryBuilder extends org.javers.core.AbstractContainerBuilder
-
-
Constructor Summary
Constructors Constructor Description SqlRepositoryBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JaversSqlRepository
build()
protected <T> T
getContainerComponent(java.lang.Class<T> ofClass)
For testing onlystatic SqlRepositoryBuilder
sqlRepository()
SqlRepositoryBuilder
withConnectionProvider(ConnectionProvider connectionProvider)
SqlRepositoryBuilder
withDialect(DialectName dialect)
SqlRepositoryBuilder
withGlobalIdCacheDisabled(boolean globalIdCacheDisabled)
Since 2.7.2, JaversTransactionalDecorator evicts the cache on transaction rollback, so there are no known reasons to disabling it.SqlRepositoryBuilder
withSchema(java.lang.String schemaName)
This function sets a schema to be used for creation and updating tables.SqlRepositoryBuilder
withSchemaManagementEnabled(boolean schemaManagementEnabled)
-
-
-
Method Detail
-
sqlRepository
public static SqlRepositoryBuilder sqlRepository()
-
withDialect
public SqlRepositoryBuilder withDialect(DialectName dialect)
-
withConnectionProvider
public SqlRepositoryBuilder withConnectionProvider(ConnectionProvider connectionProvider)
-
withSchema
public SqlRepositoryBuilder withSchema(java.lang.String schemaName)
This function sets a schema to be used for creation and updating tables. When passing a schema name make sure that the schema has been created in the database before running JaVers. If schemaName is null or empty, the default schema is used instead.- Since:
- 2.4
-
withGlobalIdCacheDisabled
public SqlRepositoryBuilder withGlobalIdCacheDisabled(boolean globalIdCacheDisabled)
Since 2.7.2, JaversTransactionalDecorator evicts the cache on transaction rollback, so there are no known reasons to disabling it.
-
withSchemaManagementEnabled
public SqlRepositoryBuilder withSchemaManagementEnabled(boolean schemaManagementEnabled)
-
build
public JaversSqlRepository build()
-
getContainerComponent
protected <T> T getContainerComponent(java.lang.Class<T> ofClass)
For testing only- Overrides:
getContainerComponent
in classorg.javers.core.AbstractContainerBuilder
-
-