public static Object getPrimaryKeyValue(Field f, Object obj)
    {
        try
        {
            if ( Proxy.isProxyClass (obj.getClass()))
            {
                try
                {
                    return ((DeferedLoadMethodInterceptor) Proxy.getInvocationHandler(obj)).getpKey();
                } catch (ClassCastException classCastException)
                {
                    Logger.getLogger(XMLStoreSet.class.getName()).log(Level.SEVERE, null, classCastException);
                    return null;
                }
            }
            return f.get(obj);
        } catch (IllegalArgumentException ex)
        {
            Logger.getLogger(XMLStoreSet.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex)
        {
            Logger.getLogger(XMLStoreSet.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }