in cayenne/src/main/java/org/apache/cayenne/configuration/runtime/CoreModule.java [338:485]
public void configure(Binder binder) {
extend(binder).initAllExtensions()
// global stack properties
.setProperty(Constants.MAX_ID_QUALIFIER_SIZE_PROPERTY, DEFAULT_MAX_ID_QUALIFIER_SIZE)
.setProperty(Constants.CONTEXTS_SYNC_PROPERTY, "false")
// known DbAdapter detectors in reverse order of popularity.
.addAdapterDetector(FirebirdSniffer.class)
.addAdapterDetector(FrontBaseSniffer.class)
.addAdapterDetector(IngresSniffer.class)
.addAdapterDetector(SQLiteSniffer.class)
.addAdapterDetector(DB2Sniffer.class)
.addAdapterDetector(H2Sniffer.class)
.addAdapterDetector(HSQLDBSniffer.class)
.addAdapterDetector(SybaseSniffer.class)
.addAdapterDetector(DerbySniffer.class)
.addAdapterDetector(SQLServerSniffer.class)
.addAdapterDetector(OracleSniffer.class)
.addAdapterDetector(PostgresSniffer.class)
.addAdapterDetector(MySQLSniffer.class)
.addAdapterDetector(MariaDBSniffer.class)
// PkGenerators for the known DbAdapters
.addPkGenerator(DB2Adapter.class, DB2PkGenerator.class)
.addPkGenerator(DerbyAdapter.class, DerbyPkGenerator.class)
.addPkGenerator(FrontBaseAdapter.class, FrontBasePkGenerator.class)
.addPkGenerator(H2Adapter.class, H2PkGenerator.class)
.addPkGenerator(IngresAdapter.class, IngresPkGenerator.class)
.addPkGenerator(MySQLAdapter.class, MySQLPkGenerator.class)
.addPkGenerator(OracleAdapter.class, OraclePkGenerator.class)
.addPkGenerator(Oracle8Adapter.class, OraclePkGenerator.class)
.addPkGenerator(PostgresAdapter.class, PostgresPkGenerator.class)
.addPkGenerator(SQLServerAdapter.class, SybasePkGenerator.class)
.addPkGenerator(SybaseAdapter.class, SybasePkGenerator.class)
.addSyncFilter(TransactionFilter.class)
// ExtendedTypes
.addDefaultExtendedType(new VoidType())
.addDefaultExtendedType(new BigDecimalType())
.addDefaultExtendedType(new BooleanType())
.addDefaultExtendedType(new ByteType(false))
.addDefaultExtendedType(new CharType(false, true))
.addDefaultExtendedType(new DoubleType())
.addDefaultExtendedType(new FloatType())
.addDefaultExtendedType(new IntegerType())
.addDefaultExtendedType(new LongType())
.addDefaultExtendedType(new ShortType(false))
.addDefaultExtendedType(new ByteArrayType(false, true))
.addDefaultExtendedType(new DateType())
.addDefaultExtendedType(new TimeType())
.addDefaultExtendedType(new TimestampType())
.addDefaultExtendedType(new DurationType())
// TODO: this one should be converted from ExtendedType to ValueType
.addDefaultExtendedType(new UtilDateType())
.addDefaultExtendedType(new CalendarType<>(GregorianCalendar.class))
.addDefaultExtendedType(new CalendarType<>(Calendar.class))
.addDefaultExtendedType(new GeoJsonType())
.addDefaultExtendedType(new WktType())
.addExtendedTypeFactory(new InternalUnsupportedTypeFactory())
// ValueObjectTypes
.addValueObjectType(BigIntegerValueType.class)
.addValueObjectType(BigDecimalValueType.class)
.addValueObjectType(UUIDValueType.class)
.addValueObjectType(LocalDateValueType.class)
.addValueObjectType(LocalTimeValueType.class)
.addValueObjectType(LocalDateTimeValueType.class)
.addValueObjectType(PeriodValueType.class)
.addValueObjectType(CharacterValueType.class);
binder.bind(ValueObjectTypeRegistry.class).to(DefaultValueObjectTypeRegistry.class);
binder.bind(ValueComparisonStrategyFactory.class).to(DefaultValueComparisonStrategyFactory.class);
binder.bind(JdbcEventLogger.class).to(Slf4jJdbcEventLogger.class);
binder.bind(ClassLoaderManager.class).to(DefaultClassLoaderManager.class);
binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
binder.bind(PkGeneratorFactoryProvider.class).to(PkGeneratorFactoryProvider.class);
binder.bind(PkGenerator.class).to(JdbcPkGenerator.class);
binder.bind(ConfigurationNameMapper.class).to(DefaultConfigurationNameMapper.class);
binder.bind(EventManager.class).toProvider(EventManagerProvider.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.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();
binder.bind(DataDomainFlushActionFactory.class).to(DefaultDataDomainFlushActionFactory.class);
binder.bind(DbRowOpSorter.class).to(DefaultDbRowOpSorter.class);
}