FileDocCategorySizeDatePackage
HibernateProxyHelper.javaAPI DocHibernate 3.2.5804Sun Aug 29 02:31:04 BST 2004org.hibernate.proxy

HibernateProxyHelper

public final class HibernateProxyHelper extends Object
Utility methods for working with proxies. (this class is being phased out)
author
Gavin King

Fields Summary
Constructors Summary
private HibernateProxyHelper()

		//cant instantiate
	
Methods Summary
public static java.lang.ClassgetClassWithoutInitializingProxy(java.lang.Object object)
Get the class of an instance or the underlying class of a proxy (without initializing the proxy!). It is almost always better to use the entity name!

		if (object instanceof HibernateProxy) {
			HibernateProxy proxy = (HibernateProxy) object;
			LazyInitializer li = proxy.getHibernateLazyInitializer();
			return li.getPersistentClass();
		}
		else {
			return object.getClass();
		}