Class CoreModule
java.lang.Object
org.apache.cayenne.CoreModule
- All Implemented Interfaces:
org.apache.cayenne.di.Module
A DI module containing all Cayenne runtime configuration.
- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA DI container key for the List<DbAdapterDetector> that contains objects that can discover the type of current database and install the correct DbAdapter in runtime.static final StringA DI container key for the List<ExtendedType> storing default adapter-agnostic ExtendedTypes.static final StringA DI container key for the List<Object> storing lifecycle events listeners.static final StringA DI container key for the List<String> storing locations of the one of more project configuration files.static final StringA DI container key for the Map<String, String> storing properties used by built-in Cayenne service.static final StringA DI container key for the List<ExtendedTypeFactory> storing default and user-provided ExtendedTypeFactories.static final StringA DI container key for the List<ExtendedType> storing a user-provided ExtendedTypes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(org.apache.cayenne.di.Binder binder) static org.apache.cayenne.di.ListBuilder<DbAdapterDetector> contributeAdapterDetectors(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.static org.apache.cayenne.di.ListBuilder<ExtendedType> contributeDefaultTypes(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIstatic org.apache.cayenne.di.ListBuilder<Object> contributeDomainListeners(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIstatic org.apache.cayenne.di.ListBuilder<DataChannelQueryFilter> contributeDomainQueryFilters(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIstatic org.apache.cayenne.di.ListBuilder<DataChannelSyncFilter> contributeDomainSyncFilters(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIstatic org.apache.cayenne.di.ListBuilder<String> contributeProjectLocations(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIstatic org.apache.cayenne.di.MapBuilder<String> contributeProperties(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIstatic org.apache.cayenne.di.ListBuilder<ExtendedTypeFactory> contributeTypeFactories(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIstatic org.apache.cayenne.di.ListBuilder<ExtendedType> contributeUserTypes(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIstatic org.apache.cayenne.di.ListBuilder<ValueObjectType> contributeValueObjectTypes(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIstatic CoreModuleExtenderextend(org.apache.cayenne.di.Binder b) Returns an extender object that allows the app to customize the CoreModule services.static voidsetSnapshotCacheSize(org.apache.cayenne.di.Binder binder, int size) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIstatic voiduseExternalTransactions(org.apache.cayenne.di.Binder binder, boolean useExternal) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)API
-
Field Details
-
PROPERTIES_MAP
A DI container key for the Map<String, String> storing properties used by built-in Cayenne service.- See Also:
-
ADAPTER_DETECTORS_LIST
A DI container key for the List<DbAdapterDetector> that contains objects that can discover the type of current database and install the correct DbAdapter in runtime.- See Also:
-
DOMAIN_LISTENERS_LIST
A DI container key for the List<Object> storing lifecycle events listeners.- See Also:
-
PROJECT_LOCATIONS_LIST
A DI container key for the List<String> storing locations of the one of more project configuration files.- See Also:
-
DEFAULT_TYPES_LIST
A DI container key for the List<ExtendedType> storing default adapter-agnostic ExtendedTypes.- See Also:
-
USER_TYPES_LIST
A DI container key for the List<ExtendedType> storing a user-provided ExtendedTypes.- See Also:
-
TYPE_FACTORIES_LIST
A DI container key for the List<ExtendedTypeFactory> storing default and user-provided ExtendedTypeFactories.- See Also:
-
-
Constructor Details
-
CoreModule
-
-
Method Details
-
extend
Returns an extender object that allows the app to customize the CoreModule services.- Since:
- 5.0
-
useExternalTransactions
@Deprecated(since="5.0", forRemoval=true) public static void useExternalTransactions(org.apache.cayenne.di.Binder binder, boolean useExternal) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APISets transaction management to either external or internal transactions. Default is internally-managed transactions.- Parameters:
binder- DI binder passed to the module during injector startup.useExternal- whether external (true) or internal (false) transaction management should be used.- Since:
- 4.0
-
setSnapshotCacheSize
@Deprecated(since="5.0", forRemoval=true) public static void setSnapshotCacheSize(org.apache.cayenne.di.Binder binder, int size) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APISets max size of snapshot cache, in pre 4.0 version this was set in the Modeler.- Parameters:
binder- DI binder passed to the module during injector startup.size- max size of snapshot cache- Since:
- 4.0
-
contributeProjectLocations
@Deprecated(since="5.0", forRemoval=true) public static org.apache.cayenne.di.ListBuilder<String> contributeProjectLocations(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIProvides access to a DI collection builder for String locations that allows downstream modules to "contribute" their own Cayenne project locations.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for String locations.
-
contributeDomainQueryFilters
@Deprecated(since="5.0", forRemoval=true) public static org.apache.cayenne.di.ListBuilder<DataChannelQueryFilter> contributeDomainQueryFilters(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIProvides access to a DI collection builder forDataChannelQueryFilter's that allows downstream modules to "contribute" their own DataDomain query filters- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for DataChannelQueryFilter.
- Since:
- 4.1
-
contributeDomainSyncFilters
@Deprecated(since="5.0", forRemoval=true) public static org.apache.cayenne.di.ListBuilder<DataChannelSyncFilter> contributeDomainSyncFilters(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIProvides access to a DI collection builder forDataChannelSyncFilter's that allows downstream modules to "contribute" their own DataDomain sync filters- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for DataChannelSyncFilter.
- Since:
- 4.1
-
contributeDomainListeners
@Deprecated(since="5.0", forRemoval=true) public static org.apache.cayenne.di.ListBuilder<Object> contributeDomainListeners(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIProvides access to a DI collection builder for lifecycle events listeners.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for listener Objects.
- Since:
- 4.0
-
contributeAdapterDetectors
@Deprecated(since="5.0", forRemoval=true) public static org.apache.cayenne.di.ListBuilder<DbAdapterDetector> contributeAdapterDetectors(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIProvides access to a DI collection builder forDbAdapterDetector's that allows downstream modules to "contribute" their own adapter detectors.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for DbAdapterDetectors.
- Since:
- 4.0
-
contributeProperties
@Deprecated(since="5.0", forRemoval=true) public static org.apache.cayenne.di.MapBuilder<String> contributeProperties(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIProvides access to a DI map builder for runtime properties that allows downstream modules to "contribute" their own properties.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- MapBuilder for properties.
- Since:
- 4.0
-
contributeTypeFactories
@Deprecated(since="5.0", forRemoval=true) public static org.apache.cayenne.di.ListBuilder<ExtendedTypeFactory> contributeTypeFactories(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIProvides access to a DI collection builder forExtendedTypeFactory's that allows downstream modules to "contribute" their own factories.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for ExtendedTypes.
- Since:
- 4.0
-
contributeDefaultTypes
@Deprecated(since="5.0", forRemoval=true) public static org.apache.cayenne.di.ListBuilder<ExtendedType> contributeDefaultTypes(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIProvides access to a DI collection builder for default adapter-agnosticExtendedType's that allows downstream modules to "contribute" their own types. "Default" types are loaded before adapter-provided or "user" types, so they may be overridden by those.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for ExtendedTypes.
- Since:
- 4.0
-
contributeUserTypes
@Deprecated(since="5.0", forRemoval=true) public static org.apache.cayenne.di.ListBuilder<ExtendedType> contributeUserTypes(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)APIProvides access to a DI collection builder forExtendedType's that allows downstream modules to "contribute" their own types. Unlike "default" types, "user" types are loaded after the adapter-provided types and can override those.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for ExtendedTypes.
- Since:
- 4.0
-
contributeValueObjectTypes
@Deprecated(since="5.0", forRemoval=true) public static org.apache.cayenne.di.ListBuilder<ValueObjectType> contributeValueObjectTypes(org.apache.cayenne.di.Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofextend(Binder)API- Parameters:
binder- DI binder passed to module during injector startup- Returns:
- ListBuilder for user-contributed ValueObjectTypes
- Since:
- 4.0
-
configure
public void configure(org.apache.cayenne.di.Binder binder) - Specified by:
configurein interfaceorg.apache.cayenne.di.Module
-
extend(Binder)API