Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.reflect
Class ClassDescriptorMap

    java.lang.Object
      org.apache.cayenne.reflect.ClassDescriptorMap

    public class ClassDescriptorMap

extends java.lang.Object

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.

Since:
  3.0

Field Summary
`protected java.util.Map<java.lang.String,ClassDescriptor>` | `descriptors`
`protected java.util.List<ClassDescriptorFactory>` | `factories`
`protected EntityResolver` | `resolver`

Constructor Summary
`ClassDescriptorMap(EntityResolver resolver)`

Method Summary
`void` | `addDescriptor(java.lang.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(java.lang.String entityName)` Creates a new descriptor.
`protected ClassDescriptor` | `createProxyDescriptor(java.lang.String entityName)` Creates a descriptor wrapper that will compile the underlying descriptor on demand.
`ClassDescriptor` | `getDescriptor(java.lang.String entityName)`
`EntityResolver` | `getResolver()`
`void` | `removeDescriptor(java.lang.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

### resolver

    protected EntityResolver resolver

### descriptors

    protected java.util.Map<java.lang.String,ClassDescriptor> descriptors

### factories

    protected java.util.List<ClassDescriptorFactory> factories

Constructor Detail

### ClassDescriptorMap

    public ClassDescriptorMap(EntityResolver resolver)

Method Detail

### getResolver

    public EntityResolver getResolver()

### addFactory

    public void addFactory(ClassDescriptorFactory factory)

  Adds a factory to the descriptor factory chain.

### removeFactory

    public void removeFactory(ClassDescriptorFactory factory)

### clearFactories

    public void clearFactories()

### clearDescriptors

    public void clearDescriptors()

### removeDescriptor

    public void removeDescriptor(java.lang.String entityName)

  Removes cached descriptor if any for the given entity.

### addDescriptor

    public void addDescriptor(java.lang.String entityName,
                              ClassDescriptor descriptor)

  Caches descriptor definition.

### getDescriptor

    public ClassDescriptor getDescriptor(java.lang.String entityName)

### createProxyDescriptor

    protected ClassDescriptor createProxyDescriptor(java.lang.String entityName)

  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

    protected ClassDescriptor createDescriptor(java.lang.String entityName)

  Creates a new descriptor.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.