Package org.bgerp.app.cfg

# Class Setup

java.lang.Object
java.util.AbstractMap<String,String>
org.bgerp.app.cfg.ConfigMap
org.bgerp.app.cfg.Preferences
org.bgerp.app.cfg.Setup

All Implemented Interfaces:
  `Map<String,String>`

public class Setup extends Preferences

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.util.AbstractMap

  `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

  ## Nested classes/interfaces inherited from interface java.util.Map

  `Map.Entry<K,V>`

- ## Field Summary

  ### Fields inherited from class org.bgerp.app.cfg.Preferences

  `data`

  ### Fields inherited from class org.bgerp.app.cfg.ConfigMap

  `EMPTY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Setup(boolean initConfigAndPool)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getBundleName()`
  `ConnectionPool`
  `getConnectionPool()`
  `DataSource`
  `getDataSource()`
  Deprecated.
  `Connection`
  `getDBConnectionFromPool()`
  `Connection`
  `getDBSlaveConnectionFromPool()`
  `static Setup`
  `getSetup()`
  Use this singleton call wisely, because introducing that everywhere makes code hardly testable.
  `DataSource`
  `getSlaveDataSource()`
  Deprecated.
  `static void`
  `resetSetup(ConnectionPool pool)`

  ### Methods inherited from class org.bgerp.app.cfg.Preferences

  `entrySet, get, getDataMap, loadBundle, processIncludes, put, putAll, removeSub`

  ### Methods inherited from class org.bgerp.app.cfg.ConfigMap

  `clearConfigs, get, getBigDecimal, getBoolean, getBoolean, getConfig, getConfig, getDataString, getInt, getInt, getLong, getLong, getSok, getSok, getSokBoolean, getSokBoolean, getSokLong, getSokLong, removeConfig, sub, subIndexed, subKeyed, subSok, subSokIndexed, validateConfig`

  ### Methods inherited from class java.util.AbstractMap

  `clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, remove, size, toString, values`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface java.util.Map

  `compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll`

- ## Constructor Details

  - ### Setup

    public Setup(boolean initConfigAndPool)

- ## Method Details

  - ### getBundleName

    public static String getBundleName()

  - ### getSetup

    public static Setup getSetup()
    Use this singleton call wisely, because introducing that everywhere makes code hardly testable.
    Returns:

  - ### resetSetup

    public static void resetSetup(ConnectionPool pool)

  - ### getConnectionPool

    public ConnectionPool getConnectionPool()

  - ### getDBConnectionFromPool

    public Connection getDBConnectionFromPool()

  - ### getDBSlaveConnectionFromPool

    public Connection getDBSlaveConnectionFromPool()

  - ### getDataSource

    @Deprecated public DataSource getDataSource()
    Deprecated.
    Use `getDBConnectionFromPool()`.

  - ### getSlaveDataSource

    @Deprecated public DataSource getSlaveDataSource()
    Deprecated.
    Use `getDBSlaveConnectionFromPool()`.