org.apache.cayenne.reflect
Class PersistentDescriptorFactory
java.lang.Object
org.apache.cayenne.reflect.PersistentDescriptorFactory
- All Implemented Interfaces:
- ClassDescriptorFactory
- Direct Known Subclasses:
- DataObjectDescriptorFactory, EnhancedPojoDescriptorFactory, ValueHolderDescriptorFactory
public abstract class PersistentDescriptorFactory
- extends Object
- implements ClassDescriptorFactory
A convenience superclass for ClassDescriptorFactory
implementors.
- Since:
- 3.0
- Author:
- Andrus Adamchik
Method Summary |
protected Accessor |
createAccessor(PersistentDescriptor descriptor,
String propertyName,
Class propertyType)
Creates an accessor for the property. |
protected void |
createAttributeProperty(PersistentDescriptor descriptor,
ObjAttribute attribute)
|
protected PersistentDescriptor |
createDescriptor()
|
protected Accessor |
createEmbeddableAccessor(Class embeddableClass,
String propertyName,
Class propertyType)
Creates an accessor for the property of the embeddable class. |
protected void |
createEmbeddedAttributeProperty(PersistentDescriptor descriptor,
EmbeddedAttribute embeddedAttribute,
ObjAttribute attribute)
|
protected abstract void |
createToManyProperty(PersistentDescriptor descriptor,
ObjRelationship relationship)
|
protected abstract void |
createToOneProperty(PersistentDescriptor descriptor,
ObjRelationship relationship)
|
protected ClassDescriptor |
getDescriptor(ObjEntity entity,
Class entityClass)
|
ClassDescriptor |
getDescriptor(String entityName)
Returns a ClassDescriptor instance for a given symbolic entity name. |
protected void |
indexSubclassDescriptors(PersistentDescriptor descriptor,
EntityInheritanceTree inheritanceTree)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
descriptorMap
protected ClassDescriptorMap descriptorMap
PersistentDescriptorFactory
public PersistentDescriptorFactory(ClassDescriptorMap descriptorMap)
getDescriptor
public ClassDescriptor getDescriptor(String entityName)
- Description copied from interface:
ClassDescriptorFactory
- Returns a ClassDescriptor instance for a given symbolic entity name. Returns null
if this factory doesn't support this type of entity.
- Specified by:
getDescriptor
in interface ClassDescriptorFactory
getDescriptor
protected ClassDescriptor getDescriptor(ObjEntity entity,
Class entityClass)
createDescriptor
protected PersistentDescriptor createDescriptor()
createAttributeProperty
protected void createAttributeProperty(PersistentDescriptor descriptor,
ObjAttribute attribute)
createEmbeddedAttributeProperty
protected void createEmbeddedAttributeProperty(PersistentDescriptor descriptor,
EmbeddedAttribute embeddedAttribute,
ObjAttribute attribute)
createToOneProperty
protected abstract void createToOneProperty(PersistentDescriptor descriptor,
ObjRelationship relationship)
createToManyProperty
protected abstract void createToManyProperty(PersistentDescriptor descriptor,
ObjRelationship relationship)
indexSubclassDescriptors
protected void indexSubclassDescriptors(PersistentDescriptor descriptor,
EntityInheritanceTree inheritanceTree)
createAccessor
protected Accessor createAccessor(PersistentDescriptor descriptor,
String propertyName,
Class propertyType)
throws PropertyException
- Creates an accessor for the property.
- Throws:
PropertyException
createEmbeddableAccessor
protected Accessor createEmbeddableAccessor(Class embeddableClass,
String propertyName,
Class propertyType)
- Creates an accessor for the property of the embeddable class.
Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.