A generic method to be used on Type enities, e.g. ProductType. Recurse to the root level in the type hierarchy
and checks if the specified type childType has parentType as its parent somewhere in the hierarchy.
delegator - The Delegator object.
entityName - Name of the Type entity on which check is performed.
primaryKey - Primary Key field of the Type entity.
childType - Type value for which the check is performed.
parentTypeField - Field in Type entity which stores the parent type.
parentType - Value of the parent type against which check is performed.