|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.reflect.ClassDescriptorMap
public class 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 ot synchronized internally, so it has to be prefilled with descriptors by the caller on initialization via calling 'getDescriptor' for all mapped entities.
Field Summary | |
---|---|
protected Map<String,ClassDescriptor> |
descriptors
|
protected List<ClassDescriptorFactory> |
factories
|
protected EntityResolver |
resolver
|
Constructor Summary | |
---|---|
ClassDescriptorMap(EntityResolver resolver)
|
Method Summary | |
---|---|
void |
addDescriptor(String entityName,
ClassDescriptor descriptor)
Caches descriptor definition. |
void |
addFactory(ClassDescriptorFactory factory)
Adds a factory to the descriptor factory chain. |
void |
clearDescriptors()
|
void |
clearFactories()
|
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. |
ClassDescriptor |
getDescriptor(String entityName)
|
EntityResolver |
getResolver()
|
void |
removeDescriptor(String entityName)
Removes cached descriptor if any for the given entity. |
void |
removeFactory(ClassDescriptorFactory factory)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EntityResolver resolver
protected Map<String,ClassDescriptor> descriptors
protected List<ClassDescriptorFactory> factories
Constructor Detail |
---|
public ClassDescriptorMap(EntityResolver resolver)
Method Detail |
---|
public EntityResolver getResolver()
public void addFactory(ClassDescriptorFactory factory)
public void removeFactory(ClassDescriptorFactory factory)
public void clearFactories()
public void clearDescriptors()
public void removeDescriptor(String entityName)
public void addDescriptor(String entityName, ClassDescriptor descriptor)
public ClassDescriptor getDescriptor(String entityName)
protected ClassDescriptor createProxyDescriptor(String entityName)
protected ClassDescriptor createDescriptor(String entityName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |