* Implementation of PersistenceUtil interface
* @since Java Persistence 2.0
*/
private static class PersistenceUtilImpl implements PersistenceUtil {
public boolean isLoaded(Object entity, String attributeName) {
PersistenceProviderResolver resolver = PersistenceProviderResolverHolder.getPersistenceProviderResolver();
List<PersistenceProvider> providers = resolver.getPersistenceProviders();
for (PersistenceProvider provider : providers) {
LoadState loadstate = provider.getProviderUtil().isLoadedWithoutReference(entity, attributeName);
if(loadstate == LoadState.LOADED) {
return true;