Package org.apache.cayenne.reflect
Class ClassDescriptorMap
java.lang.Object
org.apache.cayenne.reflect.ClassDescriptorMap
An object that holds class descriptors for mapped entities, compiling new
descriptors on demand using an internal chain of descriptor factories. Note
that the object is not synchronized internally, so it has to be prefilled
with descriptors by the caller on initialization via calling 'getDescriptor'
for all mapped entities.
- Since:
- 3.0
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map
<String, ClassDescriptor> protected List
<ClassDescriptorFactory> protected EntityResolver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDescriptor
(String entityName, ClassDescriptor descriptor) Caches descriptor definition.void
addFactory
(ClassDescriptorFactory factory) Adds a factory to the descriptor factory chain.void
void
protected ClassDescriptor
createDescriptor
(String entityName) Creates a new descriptor.protected ClassDescriptor
createProxyDescriptor
(String entityName) Creates a descriptor wrapper that will compile the underlying descriptor on demand.getDescriptor
(String entityName) void
removeDescriptor
(String entityName) Removes cached descriptor if any for the given entity.void
removeFactory
(ClassDescriptorFactory factory)
-
Field Details
-
resolver
-
descriptors
-
factories
-
-
Constructor Details
-
ClassDescriptorMap
-
-
Method Details
-
getResolver
-
addFactory
Adds a factory to the descriptor factory chain. -
removeFactory
-
clearFactories
public void clearFactories() -
clearDescriptors
public void clearDescriptors() -
removeDescriptor
Removes cached descriptor if any for the given entity. -
addDescriptor
Caches descriptor definition. -
getDescriptor
-
createProxyDescriptor
Creates a descriptor wrapper that will compile the underlying descriptor on demand. Using proxy indirection is needed to compile relationships of descriptors to other descriptors that are not compiled yet. -
createDescriptor
Creates a new descriptor.
-