use of org.apache.cayenne.reflect.Accessor in project cayenne by apache.
the class ValueHolderDescriptorFactory method createToOneProperty.
@Override
protected void createToOneProperty(PersistentDescriptor descriptor, ObjRelationship relationship) {
ClassDescriptor targetDescriptor = descriptorMap.getDescriptor(relationship.getTargetEntityName());
String reverseName = relationship.getReverseRelationshipName();
Accessor accessor = createAccessor(descriptor, relationship.getName(), ValueHolder.class);
PropertyDescriptor property = new ValueHolderProperty(descriptor, targetDescriptor, accessor, reverseName);
descriptor.addDeclaredProperty(property);
}
use of org.apache.cayenne.reflect.Accessor in project cayenne by apache.
the class ValueHolderDescriptorFactory method createToManySetProperty.
@Override
protected void createToManySetProperty(PersistentDescriptor descriptor, ObjRelationship relationship) {
ClassDescriptor targetDescriptor = descriptorMap.getDescriptor(relationship.getTargetEntityName());
String reverseName = relationship.getReverseRelationshipName();
Accessor accessor = createAccessor(descriptor, relationship.getName(), Set.class);
descriptor.addDeclaredProperty(new ValueHolderSetProperty(descriptor, targetDescriptor, accessor, reverseName));
}
use of org.apache.cayenne.reflect.Accessor in project cayenne by apache.
the class DataObjectDescriptorFactory method createToManyMapProperty.
@Override
protected void createToManyMapProperty(PersistentDescriptor descriptor, ObjRelationship relationship) {
ClassDescriptor targetDescriptor = descriptorMap.getDescriptor(relationship.getTargetEntityName());
Accessor mapKeyAccessor = createMapKeyAccessor(relationship, targetDescriptor);
descriptor.addDeclaredProperty(new DataObjectToManyMapProperty(relationship, targetDescriptor, faultFactory.getMapFault(mapKeyAccessor), mapKeyAccessor));
}
use of org.apache.cayenne.reflect.Accessor in project cayenne by apache.
the class ValueHolderDescriptorFactory method createToManyListProperty.
@Override
protected void createToManyListProperty(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));
}
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));
}
Aggregations