# Class DataDomainProvider

java.lang.Object
org.apache.cayenne.configuration.runtime.DataDomainProvider

All Implemented Interfaces:
  `Provider<DataDomain>`

public class DataDomainProvider extends Object implements Provider<DataDomain>
A `DataChannel` provider that provides a single instance of DataDomain configured per configuration supplied via injected `DataChannelDescriptorLoader`.

Since:
  3.1

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected DataNodeDescriptors`
  `dataNodeDescriptors`
  `protected DataNodeFactory`
  `dataNodeFactory`
  `protected DataChannelDescriptorMerger`
  `descriptorMerger`
  `protected EntitySorterFactory`
  `entitySorterFactory`
  `protected EventManager`
  `eventManager`
  `protected DataDomainFlushActionFactory`
  `flushActionFactory`
  `protected Injector`
  `injector`
  `protected List<Object>`
  `listeners`
  `protected DataChannelDescriptorLoader`
  `loader`
  `protected List<String>`
  `locations`
  `protected AdhocObjectFactory`
  `objectFactory`
  `protected QueryCache`
  `queryCache`
  `protected List<DataChannelQueryFilter>`
  `queryFilters`
  `protected ResourceLocator`
  `resourceLocator`
  `protected RuntimeProperties`
  `runtimeProperties`
  `static final String`
  `SHARED_CACHE_ENABLED_DEFAULT`
  `static final String`
  `SHARED_CACHE_ENABLED_PROPERTY`
  `protected List<DataChannelSyncFilter>`
  `syncFilters`
  `protected TransactionFactory`
  `transactionFactory`
  `protected TransactionManager`
  `transactionManager`
  `static final String`
  `VALIDATING_OBJECTS_ON_COMMIT_DEFAULT`
  `static final String`
  `VALIDATING_OBJECTS_ON_COMMIT_PROPERTY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DataDomainProvider()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `addDataNode(DataDomain domain, DataNodeDescriptor descriptor, Set<String> mapNames)`
  `protected void`
  `addDefaultDataNode(DataDomain domain, DataNodeDescriptor descriptor)`
  `protected EntityResolver`
  `createEntityResolver(DataChannelDescriptor descriptor)`
  `protected DataRowStore`
  `createSharedSnapshotCache(DataChannelDescriptor descriptor)`
  Returns a snapshot cache shared by all DataContexts of the domain, or null if the descriptor turns the shared cache off, and each DataContext is to use a cache of its own.
  `DataDomain`
  `get()`
  `protected DataChannelDescriptor`
  `loadDescriptor()`

  ### Methods inherited from class Object

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

- ## Field Details

  - ### SHARED_CACHE_ENABLED_PROPERTY

    public static final String SHARED_CACHE_ENABLED_PROPERTY
    See Also:
      - Constant Field Values

  - ### SHARED_CACHE_ENABLED_DEFAULT

    public static final String SHARED_CACHE_ENABLED_DEFAULT
    See Also:
      - Constant Field Values

  - ### VALIDATING_OBJECTS_ON_COMMIT_PROPERTY

    public static final String VALIDATING_OBJECTS_ON_COMMIT_PROPERTY
    See Also:
      - Constant Field Values

  - ### VALIDATING_OBJECTS_ON_COMMIT_DEFAULT

    public static final String VALIDATING_OBJECTS_ON_COMMIT_DEFAULT
    See Also:
      - Constant Field Values

  - ### resourceLocator

    protected ResourceLocator resourceLocator

  - ### descriptorMerger

    protected DataChannelDescriptorMerger descriptorMerger

  - ### loader

    protected DataChannelDescriptorLoader loader

  - ### queryFilters

    protected List<DataChannelQueryFilter> queryFilters
    Since:
      4.1

  - ### syncFilters

    protected List<DataChannelSyncFilter> syncFilters
    Since:
      4.1

  - ### listeners

    protected List<Object> listeners

  - ### locations

    protected List<String> locations

  - ### injector

    protected Injector injector

  - ### queryCache

    protected QueryCache queryCache

  - ### runtimeProperties

    protected RuntimeProperties runtimeProperties

  - ### dataNodeFactory

    protected DataNodeFactory dataNodeFactory

  - ### transactionManager

    protected TransactionManager transactionManager

  - ### transactionFactory

    protected TransactionFactory transactionFactory

  - ### flushActionFactory

    protected DataDomainFlushActionFactory flushActionFactory

  - ### objectFactory

    protected AdhocObjectFactory objectFactory

  - ### eventManager

    protected EventManager eventManager

  - ### entitySorterFactory

    protected EntitySorterFactory entitySorterFactory

  - ### dataNodeDescriptors

    protected DataNodeDescriptors dataNodeDescriptors

- ## Constructor Details

  - ### DataDomainProvider

    public DataDomainProvider()

- ## Method Details

  - ### get

    public DataDomain get()
    Specified by:
      `get` in interface `Provider<DataDomain>`

  - ### addDataNode

    protected void addDataNode(DataDomain domain, DataNodeDescriptor descriptor, Set<String> mapNames)

  - ### addDefaultDataNode

    protected void addDefaultDataNode(DataDomain domain, DataNodeDescriptor descriptor)

  - ### createSharedSnapshotCache

    protected DataRowStore createSharedSnapshotCache(DataChannelDescriptor descriptor)
    Returns a snapshot cache shared by all DataContexts of the domain, or null if the descriptor turns the shared cache off, and each DataContext is to use a cache of its own.
    Since:
      5.0

  - ### createEntityResolver

    protected EntityResolver createEntityResolver(DataChannelDescriptor descriptor)

  - ### loadDescriptor

    protected DataChannelDescriptor loadDescriptor()
    Since:
      4.0