Class JDBCStateRepository.Builder

java.lang.Object
org.togglz.core.repository.jdbc.JDBCStateRepository.Builder
Enclosing class:
JDBCStateRepository

public static class JDBCStateRepository.Builder extends Object
Builder for a JDBCStateRepository.
  • Constructor Details

  • Method Details

    • tableName

      public JDBCStateRepository.Builder tableName(String tableName)
      Sets the table name to use for the Togglz feature state table. The default name is TOGGLZ.
      Parameters:
      tableName - The database table name
    • serializer

      public JDBCStateRepository.Builder serializer(MapSerializer serializer)
      The MapSerializer for storing parameters. By default the repository will use DefaultMapSerializer.multiline().
      Parameters:
      serializer - The serializer to use
    • noCommit

      public JDBCStateRepository.Builder noCommit(boolean noCommit)
      Can be used to suppress to commit after modifying data in the repository. Can be useful if Togglz uses managed connections provided by a JEE container. The default is false.
      Parameters:
      noCommit - true to suppress commits
    • createTable

      public JDBCStateRepository.Builder createTable(boolean createTable)
      If set to true, the table will be automatically created if it is missing. The default is true.
      Parameters:
      createTable - true if the table should be created automatically
    • usePostgresTextColumns

      public JDBCStateRepository.Builder usePostgresTextColumns(boolean usePostgresTextColumns)
      If set to true, createTable being true, and running on PostgreSQL, the table will use the TEXT column type where possible. The default is false.
      Parameters:
      usePostgresTextColumns - true if PostgreSQL's TEXT column type should be used
    • build

      public JDBCStateRepository build()
      Creates a JDBCStateRepository from the current configuration