Search in sources :

Example 6 with Accessor

use of org.apache.cayenne.reflect.Accessor in project cayenne by apache.

the class ValueHolderDescriptorFactory method createToManyCollectionProperty.

@Override
protected void createToManyCollectionProperty(PersistentDescriptor descriptor, ObjRelationship relationship) {
    ClassDescriptor targetDescriptor = descriptorMap.getDescriptor(relationship.getTargetEntityName());
    String reverseName = relationship.getReverseRelationshipName();
    Accessor accessor = createAccessor(descriptor, relationship.getName(), List.class);
    descriptor.addDeclaredProperty(new ValueHolderListProperty(descriptor, targetDescriptor, accessor, reverseName));
}
Also used : ClassDescriptor(org.apache.cayenne.reflect.ClassDescriptor) Accessor(org.apache.cayenne.reflect.Accessor)

Aggregations

Accessor (org.apache.cayenne.reflect.Accessor)6 ClassDescriptor (org.apache.cayenne.reflect.ClassDescriptor)6 PropertyDescriptor (org.apache.cayenne.reflect.PropertyDescriptor)2