Class SqlRepositoryBuilder

java.lang.Object
org.javers.core.AbstractContainerBuilder
org.javers.repository.sql.SqlRepositoryBuilder

public class SqlRepositoryBuilder extends org.javers.core.AbstractContainerBuilder
  • Constructor Details

    • SqlRepositoryBuilder

      public SqlRepositoryBuilder()
  • Method Details

    • sqlRepository

      public static SqlRepositoryBuilder sqlRepository()
    • withDialect

      public SqlRepositoryBuilder withDialect(DialectName dialect)
    • withConnectionProvider

      public SqlRepositoryBuilder withConnectionProvider(ConnectionProvider connectionProvider)
    • withCdoSnapshotStateCodec

      public SqlRepositoryBuilder withCdoSnapshotStateCodec(CdoSnapshotStateCodec cdoSnapshotStateCodec)
    • withSchema

      public SqlRepositoryBuilder withSchema(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)
    • withGlobalIdTableName

      public SqlRepositoryBuilder withGlobalIdTableName(String globalIdTableName)
    • withCommitTableName

      public SqlRepositoryBuilder withCommitTableName(String commitTableName)
    • withSnapshotTableName

      public SqlRepositoryBuilder withSnapshotTableName(String snapshotTableName)
    • withCommitPropertyTableName

      public SqlRepositoryBuilder withCommitPropertyTableName(String commitPropertyTableName)
    • build

      public JaversSqlRepository build()
    • getContainerComponent

      protected <T> T getContainerComponent(Class<T> ofClass)
      For testing only
      Overrides:
      getContainerComponent in class org.javers.core.AbstractContainerBuilder