Package org.apache.cayenne.reflect
Class PersistentDescriptorFactory
java.lang.Object
org.apache.cayenne.reflect.PersistentDescriptorFactory
- All Implemented Interfaces:
ClassDescriptorFactory
- Direct Known Subclasses:
DataObjectDescriptorFactory,ValueHolderDescriptorFactory
public abstract class PersistentDescriptorFactory extends Object implements ClassDescriptorFactory
A convenience superclass for
ClassDescriptorFactory implementors.- Since:
- 3.0
-
Field Summary
Fields Modifier and Type Field Description protected ClassDescriptorMapdescriptorMap -
Constructor Summary
Constructors Constructor Description PersistentDescriptorFactory(ClassDescriptorMap descriptorMap) -
Method Summary
Modifier and Type Method Description protected AccessorcreateAccessor(PersistentDescriptor descriptor, String propertyName, Class<?> propertyType)Creates an accessor for the property.protected voidcreateAttributeProperty(PersistentDescriptor descriptor, ObjAttribute attribute)protected PersistentDescriptorcreateDescriptor()protected AccessorcreateEmbeddableAccessor(EmbeddableDescriptor descriptor, String propertyName, Class<?> propertyType)Creates an accessor for the property of the embeddable class.protected EmbeddableDescriptorcreateEmbeddableDescriptor(EmbeddedAttribute embeddedAttribute)Creates a descriptor of the embedded property.protected voidcreateEmbeddedAttributeProperty(PersistentDescriptor descriptor, EmbeddedAttribute embeddedAttribute, ObjAttribute attribute)protected AccessorcreateMapKeyAccessor(ObjRelationship relationship, ClassDescriptor targetDescriptor)Creates an accessor to read a map key for a given relationship.protected abstract voidcreateToManyCollectionProperty(PersistentDescriptor descriptor, ObjRelationship relationship)protected abstract voidcreateToManyListProperty(PersistentDescriptor descriptor, ObjRelationship relationship)protected abstract voidcreateToManyMapProperty(PersistentDescriptor descriptor, ObjRelationship relationship)protected abstract voidcreateToManySetProperty(PersistentDescriptor descriptor, ObjRelationship relationship)protected abstract voidcreateToOneProperty(PersistentDescriptor descriptor, ObjRelationship relationship)ClassDescriptorgetDescriptor(String entityName)Returns a ClassDescriptor instance for a given symbolic entity name.protected ClassDescriptorgetDescriptor(ObjEntity entity, Class<?> entityClass)protected voidindexAdditionalDbEntities(PersistentDescriptor descriptor)protected voidindexQualifiers(PersistentDescriptor descriptor, EntityInheritanceTree inheritanceTree)protected voidindexRootDbEntities(PersistentDescriptor descriptor, EntityInheritanceTree inheritanceTree)protected voidindexSubclassDescriptors(PersistentDescriptor descriptor, EntityInheritanceTree inheritanceTree)protected voidindexSuperclassProperties(PersistentDescriptor descriptor)Adds superclass properties to the descriptor, applying proper overrides.
-
Field Details
-
descriptorMap
-
-
Constructor Details
-
PersistentDescriptorFactory
-
-
Method Details
-
getDescriptor
Description copied from interface:ClassDescriptorFactoryReturns a ClassDescriptor instance for a given symbolic entity name. Returns null if this factory doesn't support this type of entity.- Specified by:
getDescriptorin interfaceClassDescriptorFactory
-
getDescriptor
-
createDescriptor
-
createAttributeProperty
-
createEmbeddedAttributeProperty
protected void createEmbeddedAttributeProperty(PersistentDescriptor descriptor, EmbeddedAttribute embeddedAttribute, ObjAttribute attribute) -
createToOneProperty
protected abstract void createToOneProperty(PersistentDescriptor descriptor, ObjRelationship relationship) -
createToManySetProperty
protected abstract void createToManySetProperty(PersistentDescriptor descriptor, ObjRelationship relationship) -
createToManyMapProperty
protected abstract void createToManyMapProperty(PersistentDescriptor descriptor, ObjRelationship relationship) -
createToManyListProperty
protected abstract void createToManyListProperty(PersistentDescriptor descriptor, ObjRelationship relationship) -
createToManyCollectionProperty
protected abstract void createToManyCollectionProperty(PersistentDescriptor descriptor, ObjRelationship relationship) -
indexSubclassDescriptors
protected void indexSubclassDescriptors(PersistentDescriptor descriptor, EntityInheritanceTree inheritanceTree) -
indexRootDbEntities
protected void indexRootDbEntities(PersistentDescriptor descriptor, EntityInheritanceTree inheritanceTree) -
indexQualifiers
protected void indexQualifiers(PersistentDescriptor descriptor, EntityInheritanceTree inheritanceTree) -
indexSuperclassProperties
Adds superclass properties to the descriptor, applying proper overrides. -
indexAdditionalDbEntities
-
createAccessor
protected Accessor createAccessor(PersistentDescriptor descriptor, String propertyName, Class<?> propertyType) throws PropertyExceptionCreates an accessor for the property.- Throws:
PropertyException
-
createMapKeyAccessor
protected Accessor createMapKeyAccessor(ObjRelationship relationship, ClassDescriptor targetDescriptor)Creates an accessor to read a map key for a given relationship. -
createEmbeddableAccessor
protected Accessor createEmbeddableAccessor(EmbeddableDescriptor descriptor, String propertyName, Class<?> propertyType)Creates an accessor for the property of the embeddable class. -
createEmbeddableDescriptor
Creates a descriptor of the embedded property.
-