org.apache.cayenne.map
Class EntityDescriptorFactory

java.lang.Object
  extended by org.apache.cayenne.map.EntityDescriptorFactory
All Implemented Interfaces:
ClassDescriptorFactory

public class EntityDescriptorFactory
extends java.lang.Object
implements ClassDescriptorFactory

A caching descriptor factory that creates ClassDescriptors based on Cayenne mapping information.

Synchronization note: This implementation is NOT synchronized, and requires external synchronization if used in a multi-threaded environment.

Since:
1.2
Author:
Andrus Adamchik

Field Summary
protected  java.util.Map classDescriptors
           
protected  EntityResolver resolver
           
 
Constructor Summary
EntityDescriptorFactory(EntityResolver resolver)
           
 
Method Summary
protected  EntityDescriptor createDescriptor(java.lang.String entityName)
          Creates a new descriptor that is not compiled.
 ClassDescriptor getDescriptor(java.lang.String entityName)
          Returns a ClassDescriptor instance for a given symbolic entity name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resolver

protected EntityResolver resolver

classDescriptors

protected java.util.Map classDescriptors
Constructor Detail

EntityDescriptorFactory

public EntityDescriptorFactory(EntityResolver resolver)
Method Detail

getDescriptor

public ClassDescriptor getDescriptor(java.lang.String entityName)
Description copied from interface: ClassDescriptorFactory
Returns a ClassDescriptor instance for a given symbolic entity name.

Specified by:
getDescriptor in interface ClassDescriptorFactory

createDescriptor

protected EntityDescriptor createDescriptor(java.lang.String entityName)
Creates a new descriptor that is not compiled. Compilation is intentionally deferred until after the descriptor is cached, as it triggers creation of related entity descriptors and may result in an endless loop.



Copyright © 2001-2006 Apache.org All Rights Reserved.