org.eclipse.emf.cdo.server.db

## Class CDODBUtil

- java.lang.Object
- - org.eclipse.emf.cdo.server.db.CDODBUtil

-     public final class CDODBUtil
      extends Object

  Various static methods that may help in setting up and dealing with `DB stores`.
  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_STATEMENT_CACHE_CAPACITY`
    `static String` | `EXT_POINT_MAPPING_STRATEGIES`
    `static String` | `PROP_COPY_ON_BRANCH`
    `static String` | `PROP_WITH_RANGES`
    `static String` | `PROP_ZEROBASED_INDEX`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IMappingStrategy` | `createHorizontalMappingStrategy()` Creates a horizontal `mapping strategy` that supports all valid combinations of auditing and branching.
    `static IMappingStrategy` | `createHorizontalMappingStrategy(boolean auditing)`
    `static IMappingStrategy` | `createHorizontalMappingStrategy(boolean auditing, boolean branching)`
    `static IMappingStrategy` | `createHorizontalMappingStrategy(boolean auditing, boolean branching, boolean withRanges)`
    `static IMappingStrategy` | `createMappingStrategy(String type)` Can only be used when Eclipse is running.
    `static IPreparedStatementCache` | `createStatementCache()` Deprecated. As of 4.2 use `IDBConnection.prepareStatement(String, org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability)`.
    `static IPreparedStatementCache` | `createStatementCache(int capacity)` Deprecated. As of 4.2 use `IDBConnection.prepareStatement(String, org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability)`.
    `static IDBStore` | `createStore(IMappingStrategy mappingStrategy, IDBAdapter dbAdapter, IDBConnectionProvider dbConnectionProvider)`
    `static IDBStore` | `createStore(IMappingStrategy mappingStrategy, IDBAdapter dbAdapter, IDBConnectionProvider dbConnectionProvider, Map<String,String> properties)`
    `static void` | `prepareContainer(IManagedContainer container)`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_STATEMENT_CACHE_CAPACITY

          public static final int DEFAULT_STATEMENT_CACHE_CAPACITY

      Since:
        2.0
      See Also:
        Constant Field Values

    - #### EXT_POINT_MAPPING_STRATEGIES

          public static final String EXT_POINT_MAPPING_STRATEGIES

      Since:
        2.0
      See Also:
        Constant Field Values

    - #### PROP_WITH_RANGES

          public static final String PROP_WITH_RANGES

      Since:
        4.1
      See Also:
        Constant Field Values

    - #### PROP_COPY_ON_BRANCH

          public static final String PROP_COPY_ON_BRANCH

      Since:
        4.1
      See Also:
        Constant Field Values

    - #### PROP_ZEROBASED_INDEX

          public static final String PROP_ZEROBASED_INDEX

      Since:
        4.1
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### prepareContainer

          public static void prepareContainer(IManagedContainer container)

      Since:
        4.0

    - #### createStore

          public static IDBStore createStore(IMappingStrategy mappingStrategy,
                                             IDBAdapter dbAdapter,
                                             IDBConnectionProvider dbConnectionProvider)

      Since:
        2.0

    - #### createStore

          public static IDBStore createStore(IMappingStrategy mappingStrategy,
                                             IDBAdapter dbAdapter,
                                             IDBConnectionProvider dbConnectionProvider,
                                             Map<String,String> properties)

      Since:
        4.2

    - #### createHorizontalMappingStrategy

          public static IMappingStrategy createHorizontalMappingStrategy(boolean auditing)

      Since:
        2.0

    - #### createHorizontalMappingStrategy

          public static IMappingStrategy createHorizontalMappingStrategy(boolean auditing,
                                                                         boolean branching)

      Since:
        3.0

    - #### createHorizontalMappingStrategy

          public static IMappingStrategy createHorizontalMappingStrategy(boolean auditing,
                                                                         boolean branching,
                                                                         boolean withRanges)

      Since:
        4.1

    - #### createHorizontalMappingStrategy

          public static IMappingStrategy createHorizontalMappingStrategy()

      Creates a horizontal `mapping strategy` that supports all valid combinations of auditing and branching.
      Since:
        4.1

    - #### createMappingStrategy

          public static IMappingStrategy createMappingStrategy(String type)

      Can only be used when Eclipse is running. In standalone scenarios create the mapping strategy instance by directly calling the constructor of the mapping strategy class.
      Since:
        2.0
      See Also:
        `createHorizontalMappingStrategy(boolean)`, `createHorizontalMappingStrategy(boolean, boolean)`

    - #### createStatementCache

          @Deprecated
          public static IPreparedStatementCache createStatementCache()

      Deprecated. As of 4.2 use `IDBConnection.prepareStatement(String, org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability)`.
      Since:
        2.0

    - #### createStatementCache

          @Deprecated
          public static IPreparedStatementCache createStatementCache(int capacity)

      Deprecated. As of 4.2 use `IDBConnection.prepareStatement(String, org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability)`.
      Since:
        2.0

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html