public class HibernateProxyHandler extends Object implements ProxyHandler, ProxyFactory
Implementation of the ProxyHandler interface for Hibernate using org.hibernate.Hibernate and HibernateProxyHelper where possible.
| Type Params | Return Type | Name and description |
|---|---|---|
<T> |
public T |
createProxy(Session session, Class<T> type, Serializable key) |
<T, K extends Serializable> |
public T |
createProxy(Session session, AssociationQueryExecutor<K, T> executor, K associationKey) |
|
public HibernateProxy |
getAssociationProxy(Object obj, String associationName)returns the proxy for an association. returns null if its not a proxy. |
|
public Serializable |
getIdentifier(Object o){@inheritDoc} |
|
public Class<?> |
getProxiedClass(Object o){@inheritDoc} |
|
public void |
initialize(Object o)Force initialization of a proxy or persistent collection. |
|
public boolean |
isInitialized(Object o)Check if the proxy or persistent collection is initialized. |
|
public boolean |
isInitialized(Object obj, String associationName)Check if an association proxy or persistent collection is initialized. |
|
public boolean |
isProxy(Object o){@inheritDoc} |
|
public Object |
unwrap(Object object)Unproxies a HibernateProxy. |
|
public Object |
unwrapIfProxy(Object instance)calls unwrap which calls unproxy |
|
public Object |
unwrapProxy(Object proxy)
|
returns the proxy for an association. returns null if its not a proxy. Note: Only used in a test. Deprecate?
{@inheritDoc}
Force initialization of a proxy or persistent collection. {@inheritDoc}
Check if the proxy or persistent collection is initialized. {@inheritDoc}
Check if an association proxy or persistent collection is initialized. {@inheritDoc}
Unproxies a HibernateProxy. If the proxy is uninitialized, it automatically triggers an initialization. In case the supplied object is null or not a proxy, the object will be returned as-is. {@inheritDoc}
calls unwrap which calls unproxy