Class DataContextFactory
java.lang.Object
org.apache.cayenne.access.DataContextFactory
- All Implemented Interfaces:
ObjectContextFactory
- Since:
- 3.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataRowStoreFactoryprotected QueryCacheprotected RuntimeProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateContext(DataChannel parent) Creates an ObjectContext attached to a provided channelcreateContext(ObjectContext parent) Creates an ObjectContext nested in the provided parent context.protected Map<ObjectId, Persistent> Creates a map of registered objects for a new ObjectStore, holding the objects with the kind of references selected byRuntimeProperties.OBJECT_RETAIN_STRATEGY_PROPERTY: weak (the default), soft or hard.protected DataContext.BuildernewBuilder(DataChannel parent)
-
Field Details
-
dataRowStoreFactory
-
runtimeProperties
-
queryCache
-
-
Constructor Details
-
DataContextFactory
public DataContextFactory()
-
-
Method Details
-
createContext
Description copied from interface:ObjectContextFactoryCreates an ObjectContext attached to a provided channel- Specified by:
createContextin interfaceObjectContextFactory
-
createContext
Description copied from interface:ObjectContextFactoryCreates an ObjectContext nested in the provided parent context. The nested context selects and commits its objects via the parent.- Specified by:
createContextin interfaceObjectContextFactory
-
newBuilder
-
createObjectMap
Creates a map of registered objects for a new ObjectStore, holding the objects with the kind of references selected byRuntimeProperties.OBJECT_RETAIN_STRATEGY_PROPERTY: weak (the default), soft or hard. The store is accessed concurrently, so the map must be thread-safe, with an atomicMap.computeIfAbsent(Object, java.util.function.Function)that lets the store register an object under an id exactly once.
-