Search in sources :

Example 6 with DataDomain

use of org.apache.cayenne.access.DataDomain in project cayenne by apache.

the class DataContextFactoryTest method testCreateDataContextWithDedicatedCache.

@Test
public void testCreateDataContextWithDedicatedCache() throws Exception {
    final EventManager eventManager = new MockEventManager();
    final DataDomain domain = new DataDomain("d1");
    domain.setSharedCacheEnabled(false);
    Module testModule = binder -> {
        binder.bind(JdbcEventLogger.class).to(Slf4jJdbcEventLogger.class);
        binder.bind(DataDomain.class).toInstance(domain);
        binder.bind(EventManager.class).toInstance(eventManager);
        binder.bind(QueryCache.class).toInstance(new MapQueryCache(5));
        binder.bind(RuntimeProperties.class).toInstance(new DefaultRuntimeProperties(Collections.<String, String>emptyMap()));
        binder.bind(ObjectMapRetainStrategy.class).to(DefaultObjectMapRetainStrategy.class);
        binder.bind(ObjectStoreFactory.class).to(DefaultObjectStoreFactory.class);
        binder.bind(TransactionFactory.class).to(DefaultTransactionFactory.class);
        binder.bind(TransactionManager.class).to(DefaultTransactionManager.class);
        binder.bind(DataRowStoreFactory.class).to(DefaultDataRowStoreFactory.class);
        binder.bind(EventBridge.class).toProvider(NoopEventBridgeProvider.class);
        binder.bind(DataRowStoreFactory.class).to(DefaultDataRowStoreFactory.class);
    };
    Injector injector = DIBootstrap.createInjector(testModule);
    DataContextFactory factory = new DataContextFactory();
    injector.injectMembers(factory);
    DataContext c3 = (DataContext) factory.createContext();
    assertNotNull(c3.getObjectStore().getDataRowCache());
    assertNull(domain.getSharedSnapshotCache());
    assertNotSame(c3.getObjectStore().getDataRowCache(), domain.getSharedSnapshotCache());
}
Also used : RuntimeProperties(org.apache.cayenne.configuration.RuntimeProperties) Injector(org.apache.cayenne.di.Injector) DataContext(org.apache.cayenne.access.DataContext) DataRowStoreFactory(org.apache.cayenne.access.DataRowStoreFactory) MapQueryCache(org.apache.cayenne.cache.MapQueryCache) TransactionManager(org.apache.cayenne.tx.TransactionManager) QueryCache(org.apache.cayenne.cache.QueryCache) Module(org.apache.cayenne.di.Module) ObjectMapRetainStrategy(org.apache.cayenne.access.ObjectMapRetainStrategy) ObjectStoreFactory(org.apache.cayenne.configuration.ObjectStoreFactory) DefaultRuntimeProperties(org.apache.cayenne.configuration.DefaultRuntimeProperties) DataDomain(org.apache.cayenne.access.DataDomain) Slf4jJdbcEventLogger(org.apache.cayenne.log.Slf4jJdbcEventLogger) EventBridge(org.apache.cayenne.event.EventBridge) MockEventManager(org.apache.cayenne.event.MockEventManager) JdbcEventLogger(org.apache.cayenne.log.JdbcEventLogger) TransactionFactory(org.apache.cayenne.tx.TransactionFactory) DefaultDataRowStoreFactory(org.apache.cayenne.access.DefaultDataRowStoreFactory) DIBootstrap(org.apache.cayenne.di.DIBootstrap) DefaultTransactionManager(org.apache.cayenne.tx.DefaultTransactionManager) DefaultTransactionFactory(org.apache.cayenne.tx.DefaultTransactionFactory) Test(org.junit.Test) DefaultObjectMapRetainStrategy(org.apache.cayenne.access.DefaultObjectMapRetainStrategy) EventManager(org.apache.cayenne.event.EventManager) NoopEventBridgeProvider(org.apache.cayenne.event.NoopEventBridgeProvider) Assert(org.junit.Assert) Collections(java.util.Collections) DefaultObjectStoreFactory(org.apache.cayenne.configuration.DefaultObjectStoreFactory) DataDomain(org.apache.cayenne.access.DataDomain) MockEventManager(org.apache.cayenne.event.MockEventManager) EventManager(org.apache.cayenne.event.EventManager) DefaultObjectStoreFactory(org.apache.cayenne.configuration.DefaultObjectStoreFactory) MapQueryCache(org.apache.cayenne.cache.MapQueryCache) DefaultRuntimeProperties(org.apache.cayenne.configuration.DefaultRuntimeProperties) DefaultDataRowStoreFactory(org.apache.cayenne.access.DefaultDataRowStoreFactory) DefaultTransactionManager(org.apache.cayenne.tx.DefaultTransactionManager) DataContext(org.apache.cayenne.access.DataContext) DefaultObjectMapRetainStrategy(org.apache.cayenne.access.DefaultObjectMapRetainStrategy) DefaultTransactionFactory(org.apache.cayenne.tx.DefaultTransactionFactory) Slf4jJdbcEventLogger(org.apache.cayenne.log.Slf4jJdbcEventLogger) Injector(org.apache.cayenne.di.Injector) NoopEventBridgeProvider(org.apache.cayenne.event.NoopEventBridgeProvider) Module(org.apache.cayenne.di.Module) MockEventManager(org.apache.cayenne.event.MockEventManager) Test(org.junit.Test)

Example 7 with DataDomain

use of org.apache.cayenne.access.DataDomain in project cayenne by apache.

the class ServerModule method configure.

public void configure(Binder binder) {
    // configure global stack properties
    contributeProperties(binder).put(Constants.SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY, String.valueOf(DEFAULT_MAX_ID_QUALIFIER_SIZE));
    binder.bind(JdbcEventLogger.class).to(Slf4jJdbcEventLogger.class);
    binder.bind(ClassLoaderManager.class).to(DefaultClassLoaderManager.class);
    binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
    // configure known DbAdapter detectors in reverse order of popularity.
    // Users can add their own to install custom adapters automatically
    contributeAdapterDetectors(binder).add(FirebirdSniffer.class).add(OpenBaseSniffer.class).add(FrontBaseSniffer.class).add(IngresSniffer.class).add(SQLiteSniffer.class).add(DB2Sniffer.class).add(H2Sniffer.class).add(HSQLDBSniffer.class).add(SybaseSniffer.class).add(DerbySniffer.class).add(SQLServerSniffer.class).add(OracleSniffer.class).add(PostgresSniffer.class).add(MySQLSniffer.class);
    // configure a filter chain with only one TransactionFilter as default
    contributeDomainFilters(binder).add(TransactionFilter.class);
    // init listener list
    contributeDomainListeners(binder);
    // configure extended types
    contributeDefaultTypes(binder).add(new VoidType()).add(new BigDecimalType()).add(new BooleanType()).add(new ByteType(false)).add(new CharType(false, true)).add(new DoubleType()).add(new FloatType()).add(new IntegerType()).add(new LongType()).add(new ShortType(false)).add(new ByteArrayType(false, true)).add(new DateType()).add(new TimeType()).add(new TimestampType()).add(new UtilDateType()).add(new CalendarType<>(GregorianCalendar.class)).add(new CalendarType<>(Calendar.class));
    contributeUserTypes(binder);
    contributeTypeFactories(binder);
    // Custom ValueObjects types contribution
    contributeValueObjectTypes(binder).add(BigIntegerValueType.class).add(UUIDValueType.class).add(LocalDateValueType.class).add(LocalTimeValueType.class).add(LocalDateTimeValueType.class).add(CharacterValueType.class);
    binder.bind(ValueObjectTypeRegistry.class).to(DefaultValueObjectTypeRegistry.class);
    // configure explicit configurations
    ListBuilder<String> locationsListBuilder = contributeProjectLocations(binder);
    binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
    binder.bind(EventManager.class).to(DefaultEventManager.class);
    binder.bind(QueryCache.class).toProvider(MapQueryCacheProvider.class);
    binder.bind(EventBridge.class).toProvider(NoopEventBridgeProvider.class);
    binder.bind(DataRowStoreFactory.class).to(DefaultDataRowStoreFactory.class);
    // a service to provide the main stack DataDomain
    binder.bind(DataDomain.class).toProvider(DataDomainProvider.class);
    binder.bind(DataNodeFactory.class).to(DefaultDataNodeFactory.class);
    // will return DataDomain for request for a DataChannel
    binder.bind(DataChannel.class).toProvider(DomainDataChannelProvider.class);
    binder.bind(ObjectContextFactory.class).to(DataContextFactory.class);
    binder.bind(TransactionFactory.class).to(DefaultTransactionFactory.class);
    // a service to load project XML descriptors
    binder.bind(DataChannelDescriptorLoader.class).to(XMLDataChannelDescriptorLoader.class);
    binder.bind(DataChannelDescriptorMerger.class).to(DefaultDataChannelDescriptorMerger.class);
    // a service to load DataMap XML descriptors
    binder.bind(DataMapLoader.class).to(XMLDataMapLoader.class);
    // a locator of resources, such as XML descriptors
    binder.bind(ResourceLocator.class).to(ClassLoaderResourceLocator.class);
    binder.bind(Key.get(ResourceLocator.class, Constants.SERVER_RESOURCE_LOCATOR)).to(ClassLoaderResourceLocator.class);
    // a global properties object
    binder.bind(RuntimeProperties.class).to(DefaultRuntimeProperties.class);
    // a service to load DataSourceFactories. DelegatingDataSourceFactory
    // will attempt to find the actual worker factory dynamically on each
    // call depending on DataNodeDescriptor data and the environment
    binder.bind(DataSourceFactory.class).to(DelegatingDataSourceFactory.class);
    binder.bind(SchemaUpdateStrategyFactory.class).to(DefaultSchemaUpdateStrategyFactory.class);
    // a default DBAdapterFactory used to load custom and automatic
    // DbAdapters
    binder.bind(DbAdapterFactory.class).to(DefaultDbAdapterFactory.class);
    // binding AshwoodEntitySorter without scope, as this is a stateful
    // object and is
    // configured by the owning domain
    binder.bind(EntitySorter.class).to(AshwoodEntitySorter.class).withoutScope();
    binder.bind(BatchTranslatorFactory.class).to(DefaultBatchTranslatorFactory.class);
    binder.bind(SelectTranslatorFactory.class).to(DefaultSelectTranslatorFactory.class);
    // a default ObjectMapRetainStrategy used to create objects map for
    // ObjectStore
    binder.bind(ObjectMapRetainStrategy.class).to(DefaultObjectMapRetainStrategy.class);
    // a default ObjectStoreFactory used to create ObjectStores for contexts
    binder.bind(ObjectStoreFactory.class).to(DefaultObjectStoreFactory.class);
    binder.bind(TransactionManager.class).to(DefaultTransactionManager.class);
    binder.bind(RowReaderFactory.class).to(DefaultRowReaderFactory.class);
    binder.bind(SQLTemplateProcessor.class).to(CayenneSQLTemplateProcessor.class);
    binder.bind(TemplateContextFactory.class).to(DefaultTemplateContextFactory.class);
    binder.bind(HandlerFactory.class).to(DefaultHandlerFactory.class);
    binder.bind(DataChannelMetaData.class).to(NoopDataChannelMetaData.class);
    binder.bind(XMLReader.class).toProviderInstance(new XMLReaderProvider(false)).withoutScope();
}
Also used : SchemaUpdateStrategyFactory(org.apache.cayenne.access.dbsync.SchemaUpdateStrategyFactory) DefaultSchemaUpdateStrategyFactory(org.apache.cayenne.access.dbsync.DefaultSchemaUpdateStrategyFactory) QueryCache(org.apache.cayenne.cache.QueryCache) EventBridge(org.apache.cayenne.event.EventBridge) ByteType(org.apache.cayenne.access.types.ByteType) FloatType(org.apache.cayenne.access.types.FloatType) DataChannelDescriptorMerger(org.apache.cayenne.configuration.DataChannelDescriptorMerger) DefaultDataChannelDescriptorMerger(org.apache.cayenne.configuration.DefaultDataChannelDescriptorMerger) XMLReaderProvider(org.apache.cayenne.configuration.xml.XMLReaderProvider) HandlerFactory(org.apache.cayenne.configuration.xml.HandlerFactory) DefaultHandlerFactory(org.apache.cayenne.configuration.xml.DefaultHandlerFactory) NoopDataChannelMetaData(org.apache.cayenne.configuration.xml.NoopDataChannelMetaData) DataChannelMetaData(org.apache.cayenne.configuration.xml.DataChannelMetaData) H2Sniffer(org.apache.cayenne.dba.h2.H2Sniffer) UtilDateType(org.apache.cayenne.access.types.UtilDateType) UtilDateType(org.apache.cayenne.access.types.UtilDateType) DateType(org.apache.cayenne.access.types.DateType) FirebirdSniffer(org.apache.cayenne.dba.firebird.FirebirdSniffer) DefaultRuntimeProperties(org.apache.cayenne.configuration.DefaultRuntimeProperties) RuntimeProperties(org.apache.cayenne.configuration.RuntimeProperties) DataRowStoreFactory(org.apache.cayenne.access.DataRowStoreFactory) DefaultDataRowStoreFactory(org.apache.cayenne.access.DefaultDataRowStoreFactory) ResourceLocator(org.apache.cayenne.resource.ResourceLocator) ClassLoaderResourceLocator(org.apache.cayenne.resource.ClassLoaderResourceLocator) DataDomain(org.apache.cayenne.access.DataDomain) ShortType(org.apache.cayenne.access.types.ShortType) LocalDateValueType(org.apache.cayenne.access.types.LocalDateValueType) ObjectMapRetainStrategy(org.apache.cayenne.access.ObjectMapRetainStrategy) DefaultObjectMapRetainStrategy(org.apache.cayenne.access.DefaultObjectMapRetainStrategy) ByteArrayType(org.apache.cayenne.access.types.ByteArrayType) TransactionManager(org.apache.cayenne.tx.TransactionManager) DefaultTransactionManager(org.apache.cayenne.tx.DefaultTransactionManager) DefaultTransactionFactory(org.apache.cayenne.tx.DefaultTransactionFactory) TransactionFactory(org.apache.cayenne.tx.TransactionFactory) XMLDataChannelDescriptorLoader(org.apache.cayenne.configuration.xml.XMLDataChannelDescriptorLoader) DataChannelDescriptorLoader(org.apache.cayenne.configuration.DataChannelDescriptorLoader) CharType(org.apache.cayenne.access.types.CharType) SybaseSniffer(org.apache.cayenne.dba.sybase.SybaseSniffer) BigDecimalType(org.apache.cayenne.access.types.BigDecimalType) FrontBaseSniffer(org.apache.cayenne.dba.frontbase.FrontBaseSniffer) VoidType(org.apache.cayenne.access.types.VoidType) LongType(org.apache.cayenne.access.types.LongType) ObjectStoreFactory(org.apache.cayenne.configuration.ObjectStoreFactory) DefaultObjectStoreFactory(org.apache.cayenne.configuration.DefaultObjectStoreFactory) PostgresSniffer(org.apache.cayenne.dba.postgres.PostgresSniffer) DataMapLoader(org.apache.cayenne.configuration.DataMapLoader) XMLDataMapLoader(org.apache.cayenne.configuration.xml.XMLDataMapLoader) ValueObjectTypeRegistry(org.apache.cayenne.access.types.ValueObjectTypeRegistry) DefaultValueObjectTypeRegistry(org.apache.cayenne.access.types.DefaultValueObjectTypeRegistry) BigIntegerValueType(org.apache.cayenne.access.types.BigIntegerValueType) TimeType(org.apache.cayenne.access.types.TimeType) SQLiteSniffer(org.apache.cayenne.dba.sqlite.SQLiteSniffer) AshwoodEntitySorter(org.apache.cayenne.ashwood.AshwoodEntitySorter) Slf4jJdbcEventLogger(org.apache.cayenne.log.Slf4jJdbcEventLogger) JdbcEventLogger(org.apache.cayenne.log.JdbcEventLogger) ConfigurationNameMapper(org.apache.cayenne.configuration.ConfigurationNameMapper) DefaultConfigurationNameMapper(org.apache.cayenne.configuration.DefaultConfigurationNameMapper) TimestampType(org.apache.cayenne.access.types.TimestampType) DefaultTemplateContextFactory(org.apache.cayenne.template.DefaultTemplateContextFactory) TemplateContextFactory(org.apache.cayenne.template.TemplateContextFactory) SQLServerSniffer(org.apache.cayenne.dba.sqlserver.SQLServerSniffer) DefaultEventManager(org.apache.cayenne.event.DefaultEventManager) EventManager(org.apache.cayenne.event.EventManager) GregorianCalendar(java.util.GregorianCalendar) Calendar(java.util.Calendar) BooleanType(org.apache.cayenne.access.types.BooleanType) RowReaderFactory(org.apache.cayenne.access.jdbc.reader.RowReaderFactory) DefaultRowReaderFactory(org.apache.cayenne.access.jdbc.reader.DefaultRowReaderFactory) ObjectContextFactory(org.apache.cayenne.configuration.ObjectContextFactory) LocalDateTimeValueType(org.apache.cayenne.access.types.LocalDateTimeValueType) IntegerType(org.apache.cayenne.access.types.IntegerType) DataChannel(org.apache.cayenne.DataChannel) DoubleType(org.apache.cayenne.access.types.DoubleType) DefaultBatchTranslatorFactory(org.apache.cayenne.access.translator.batch.DefaultBatchTranslatorFactory) BatchTranslatorFactory(org.apache.cayenne.access.translator.batch.BatchTranslatorFactory) DefaultClassLoaderManager(org.apache.cayenne.di.spi.DefaultClassLoaderManager) ClassLoaderManager(org.apache.cayenne.di.ClassLoaderManager) CayenneSQLTemplateProcessor(org.apache.cayenne.template.CayenneSQLTemplateProcessor) SQLTemplateProcessor(org.apache.cayenne.access.jdbc.SQLTemplateProcessor) DefaultAdhocObjectFactory(org.apache.cayenne.di.spi.DefaultAdhocObjectFactory) AdhocObjectFactory(org.apache.cayenne.di.AdhocObjectFactory) CalendarType(org.apache.cayenne.access.types.CalendarType) DefaultSelectTranslatorFactory(org.apache.cayenne.access.translator.select.DefaultSelectTranslatorFactory) SelectTranslatorFactory(org.apache.cayenne.access.translator.select.SelectTranslatorFactory)

Example 8 with DataDomain

use of org.apache.cayenne.access.DataDomain in project cayenne by apache.

the class ServerRuntime method getDataSource.

/**
 * Returns a default DataSource for this runtime. If no default DataSource
 * exists, an exception is thrown.
 *
 * @since 4.0
 */
public DataSource getDataSource() {
    DataDomain domain = getDataDomain();
    DataNode defaultNode = domain.getDefaultNode();
    if (defaultNode == null) {
        int s = domain.getDataNodes().size();
        if (s == 0) {
            throw new IllegalStateException("No DataSources configured");
        } else {
            throw new IllegalArgumentException("No default DataSource configured. You can get explicitly named DataSource by using 'getDataSource(String)'");
        }
    }
    return defaultNode.getDataSource();
}
Also used : DataDomain(org.apache.cayenne.access.DataDomain) DataNode(org.apache.cayenne.access.DataNode)

Example 9 with DataDomain

use of org.apache.cayenne.access.DataDomain in project cayenne by apache.

the class ServerRuntime method getDataSource.

/**
 * Provides access to the JDBC DataSource assigned to a given DataNode. A
 * null argument will work if there's only one DataNode configured.
 * <p>
 * Normally Cayenne applications don't need to access DataSource or any
 * other JDBC code directly, however in some unusual conditions it may be
 * needed, and this method provides a shortcut to raw JDBC.
 */
public DataSource getDataSource(String dataNodeName) {
    DataDomain domain = getDataDomain();
    if (dataNodeName == null) {
        return getDataSource();
    }
    DataNode node = domain.getDataNode(dataNodeName);
    if (node == null) {
        throw new IllegalArgumentException("Unknown DataNode name: " + dataNodeName);
    }
    return node.getDataSource();
}
Also used : DataDomain(org.apache.cayenne.access.DataDomain) DataNode(org.apache.cayenne.access.DataNode)

Example 10 with DataDomain

use of org.apache.cayenne.access.DataDomain in project cayenne by apache.

the class DataContextFactoryTest method testCreateDataContextValidation.

@Test
public void testCreateDataContextValidation() throws Exception {
    final EventManager eventManager = new MockEventManager();
    final DataDomain domain = new DataDomain("d1");
    domain.setValidatingObjectsOnCommit(true);
    Module testModule = binder -> {
        binder.bind(JdbcEventLogger.class).to(Slf4jJdbcEventLogger.class);
        binder.bind(DataDomain.class).toInstance(domain);
        binder.bind(EventManager.class).toInstance(eventManager);
        binder.bind(QueryCache.class).toInstance(new MapQueryCache(5));
        binder.bind(RuntimeProperties.class).toInstance(new DefaultRuntimeProperties(Collections.<String, String>emptyMap()));
        binder.bind(ObjectMapRetainStrategy.class).to(DefaultObjectMapRetainStrategy.class);
        binder.bind(ObjectStoreFactory.class).to(DefaultObjectStoreFactory.class);
        binder.bind(TransactionFactory.class).to(DefaultTransactionFactory.class);
        binder.bind(TransactionManager.class).to(DefaultTransactionManager.class);
        binder.bind(EventBridge.class).toProvider(NoopEventBridgeProvider.class);
        binder.bind(DataRowStoreFactory.class).to(DefaultDataRowStoreFactory.class);
    };
    Injector injector = DIBootstrap.createInjector(testModule);
    domain.setDataRowStoreFactory(injector.getInstance(DataRowStoreFactory.class));
    DataContextFactory factory = new DataContextFactory();
    injector.injectMembers(factory);
    DataContext c1 = (DataContext) factory.createContext();
    assertTrue(c1.isValidatingObjectsOnCommit());
    domain.setValidatingObjectsOnCommit(false);
    DataContext c2 = (DataContext) factory.createContext();
    assertFalse(c2.isValidatingObjectsOnCommit());
}
Also used : RuntimeProperties(org.apache.cayenne.configuration.RuntimeProperties) Injector(org.apache.cayenne.di.Injector) DataContext(org.apache.cayenne.access.DataContext) DataRowStoreFactory(org.apache.cayenne.access.DataRowStoreFactory) MapQueryCache(org.apache.cayenne.cache.MapQueryCache) TransactionManager(org.apache.cayenne.tx.TransactionManager) QueryCache(org.apache.cayenne.cache.QueryCache) Module(org.apache.cayenne.di.Module) ObjectMapRetainStrategy(org.apache.cayenne.access.ObjectMapRetainStrategy) ObjectStoreFactory(org.apache.cayenne.configuration.ObjectStoreFactory) DefaultRuntimeProperties(org.apache.cayenne.configuration.DefaultRuntimeProperties) DataDomain(org.apache.cayenne.access.DataDomain) Slf4jJdbcEventLogger(org.apache.cayenne.log.Slf4jJdbcEventLogger) EventBridge(org.apache.cayenne.event.EventBridge) MockEventManager(org.apache.cayenne.event.MockEventManager) JdbcEventLogger(org.apache.cayenne.log.JdbcEventLogger) TransactionFactory(org.apache.cayenne.tx.TransactionFactory) DefaultDataRowStoreFactory(org.apache.cayenne.access.DefaultDataRowStoreFactory) DIBootstrap(org.apache.cayenne.di.DIBootstrap) DefaultTransactionManager(org.apache.cayenne.tx.DefaultTransactionManager) DefaultTransactionFactory(org.apache.cayenne.tx.DefaultTransactionFactory) Test(org.junit.Test) DefaultObjectMapRetainStrategy(org.apache.cayenne.access.DefaultObjectMapRetainStrategy) EventManager(org.apache.cayenne.event.EventManager) NoopEventBridgeProvider(org.apache.cayenne.event.NoopEventBridgeProvider) Assert(org.junit.Assert) Collections(java.util.Collections) DefaultObjectStoreFactory(org.apache.cayenne.configuration.DefaultObjectStoreFactory) DataDomain(org.apache.cayenne.access.DataDomain) MockEventManager(org.apache.cayenne.event.MockEventManager) EventManager(org.apache.cayenne.event.EventManager) DefaultObjectStoreFactory(org.apache.cayenne.configuration.DefaultObjectStoreFactory) MapQueryCache(org.apache.cayenne.cache.MapQueryCache) DefaultRuntimeProperties(org.apache.cayenne.configuration.DefaultRuntimeProperties) DefaultDataRowStoreFactory(org.apache.cayenne.access.DefaultDataRowStoreFactory) DefaultTransactionManager(org.apache.cayenne.tx.DefaultTransactionManager) DataContext(org.apache.cayenne.access.DataContext) DefaultObjectMapRetainStrategy(org.apache.cayenne.access.DefaultObjectMapRetainStrategy) DefaultTransactionFactory(org.apache.cayenne.tx.DefaultTransactionFactory) Slf4jJdbcEventLogger(org.apache.cayenne.log.Slf4jJdbcEventLogger) Injector(org.apache.cayenne.di.Injector) NoopEventBridgeProvider(org.apache.cayenne.event.NoopEventBridgeProvider) Module(org.apache.cayenne.di.Module) MockEventManager(org.apache.cayenne.event.MockEventManager) DataRowStoreFactory(org.apache.cayenne.access.DataRowStoreFactory) DefaultDataRowStoreFactory(org.apache.cayenne.access.DefaultDataRowStoreFactory) Test(org.junit.Test)

Aggregations

DataDomain (org.apache.cayenne.access.DataDomain)14 DataNode (org.apache.cayenne.access.DataNode)6 DataMap (org.apache.cayenne.map.DataMap)6 DataRowStoreFactory (org.apache.cayenne.access.DataRowStoreFactory)5 EventManager (org.apache.cayenne.event.EventManager)5 Test (org.junit.Test)5 DefaultDataRowStoreFactory (org.apache.cayenne.access.DefaultDataRowStoreFactory)4 QueryCache (org.apache.cayenne.cache.QueryCache)4 DefaultRuntimeProperties (org.apache.cayenne.configuration.DefaultRuntimeProperties)4 RuntimeProperties (org.apache.cayenne.configuration.RuntimeProperties)4 Injector (org.apache.cayenne.di.Injector)4 EventBridge (org.apache.cayenne.event.EventBridge)4 JdbcEventLogger (org.apache.cayenne.log.JdbcEventLogger)4 Slf4jJdbcEventLogger (org.apache.cayenne.log.Slf4jJdbcEventLogger)4 Collections (java.util.Collections)3 DataChannel (org.apache.cayenne.DataChannel)3 DefaultObjectMapRetainStrategy (org.apache.cayenne.access.DefaultObjectMapRetainStrategy)3 ObjectMapRetainStrategy (org.apache.cayenne.access.ObjectMapRetainStrategy)3 DataChannelDescriptor (org.apache.cayenne.configuration.DataChannelDescriptor)3 DataNodeDescriptor (org.apache.cayenne.configuration.DataNodeDescriptor)3