{
String attributeName = getAttributeName(fieldNum);
ClassDescriptor cld = broker.getClassDescriptor(pc.getClass());
// field could be a primitive typed attribute...
AttributeDescriptorBase fld = cld.getFieldDescriptorByName(attributeName);
// field could be a reference attribute...
if (fld == null)
{
fld = cld.getObjectReferenceDescriptorByName(attributeName);
}
// or it could be a collection attribute:
if (fld == null)
{
fld = cld.getCollectionDescriptorByName(attributeName);
}
Object value = fld.getPersistentField().get(pc);
return value;
}