Package org.apache.cayenne.reflect
Class PersistentDescriptorFactory
java.lang.Object
org.apache.cayenne.reflect.PersistentDescriptorFactory
- All Implemented Interfaces:
ClassDescriptorFactory
- Direct Known Subclasses:
DataObjectDescriptorFactory
,ValueHolderDescriptorFactory
A convenience superclass for
ClassDescriptorFactory
implementors.- Since:
- 3.0
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Accessor
createAccessor
(PersistentDescriptor descriptor, String propertyName, Class<?> propertyType) Creates an accessor for the property.protected void
createAttributeProperty
(PersistentDescriptor descriptor, ObjAttribute attribute) protected PersistentDescriptor
protected Accessor
createEmbeddableAccessor
(EmbeddableDescriptor descriptor, String propertyName, Class<?> propertyType) Creates an accessor for the property of the embeddable class.protected EmbeddableDescriptor
createEmbeddableDescriptor
(EmbeddedAttribute embeddedAttribute) Creates a descriptor of the embedded property.protected void
createEmbeddedAttributeProperty
(PersistentDescriptor descriptor, EmbeddedAttribute embeddedAttribute, ObjAttribute attribute) protected Accessor
createMapKeyAccessor
(ObjRelationship relationship, ClassDescriptor targetDescriptor) Creates an accessor to read a map key for a given relationship.protected abstract void
createToManyCollectionProperty
(PersistentDescriptor descriptor, ObjRelationship relationship) protected abstract void
createToManyListProperty
(PersistentDescriptor descriptor, ObjRelationship relationship) protected abstract void
createToManyMapProperty
(PersistentDescriptor descriptor, ObjRelationship relationship) protected abstract void
createToManySetProperty
(PersistentDescriptor descriptor, ObjRelationship relationship) protected abstract void
createToOneProperty
(PersistentDescriptor descriptor, ObjRelationship relationship) getDescriptor
(String entityName) Returns a ClassDescriptor instance for a given symbolic entity name.protected ClassDescriptor
getDescriptor
(ObjEntity entity, Class<?> entityClass) protected void
indexAdditionalDbEntities
(PersistentDescriptor descriptor) protected void
indexQualifiers
(PersistentDescriptor descriptor, EntityInheritanceTree inheritanceTree) protected void
indexRootDbEntities
(PersistentDescriptor descriptor, EntityInheritanceTree inheritanceTree) protected void
indexSubclassDescriptors
(PersistentDescriptor descriptor, EntityInheritanceTree inheritanceTree) protected void
indexSuperclassProperties
(PersistentDescriptor descriptor) Adds superclass properties to the descriptor, applying proper overrides.
-
Field Details
-
descriptorMap
-
-
Constructor Details
-
PersistentDescriptorFactory
-
-
Method Details
-
getDescriptor
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 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 PropertyException Creates 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.
-