public class HibernateProxyHandler extends java.lang.Object implements ProxyFactory, ProxyHandler
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, java.lang.Class<T> type, java.io.Serializable key) |
<T, K extends Serializable> |
public T |
createProxy(Session session, AssociationQueryExecutor<K, T> executor, K associationKey) |
|
public org.hibernate.proxy.HibernateProxy |
getAssociationProxy(java.lang.Object obj, java.lang.String associationName) returns the proxy for an association. returns null if its not a proxy. |
|
public java.io.Serializable |
getIdentifier(java.lang.Object o) {@inheritDoc} |
|
public java.lang.Class<?> |
getProxiedClass(java.lang.Object o) {@inheritDoc} |
|
public void |
initialize(java.lang.Object o) Force initialization of a proxy or persistent collection. |
|
public boolean |
isInitialized(java.lang.Object o) Check if the proxy or persistent collection is initialized. |
|
public boolean |
isInitialized(java.lang.Object obj, java.lang.String associationName) Check if an association proxy or persistent collection is initialized. |
|
public boolean |
isProxy(java.lang.Object o) {@inheritDoc} |
|
public java.lang.Object |
unwrap(java.lang.Object object) Unproxies a HibernateProxy. |
|
public java.lang.Object |
unwrapIfProxy(java.lang.Object instance) calls unwrap which calls unproxy |
|
public java.lang.Object |
unwrapProxy(java.lang.Object proxy)
|
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
returns the proxy for an association. returns null if its not a proxy. Note: Only used in a test. Deprecate?
{@inheritDoc}
{@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}
{@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