* searched for named FetchGroups.
*/
public FetchGroup getFetchGroup(String groupName) {
FetchGroup fg = this.fetchGroups.get(groupName);
if (fg == null){
AttributeGroup ag = this.descriptor.getAttributeGroup(groupName);
if (ag != null){
fg = ag.toFetchGroup();
}
}
if (fg == null && getDescriptor().isChildDescriptor()) {
ClassDescriptor current = this.descriptor;
while (fg == null && current.isChildDescriptor()) {
ClassDescriptor parent = current.getInheritancePolicy().getParentDescriptor();
if (parent.hasFetchGroupManager()) {
fg = parent.getFetchGroupManager().getFetchGroup(groupName);
}
if (fg == null){
AttributeGroup ag = parent.getAttributeGroup(groupName);
if (ag != null){
fg = ag.toFetchGroup();
}
}
current = parent;
}
}