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)* Obtains the identifier of an object without initializing the proxy if it is one *
|
|
public java.lang.Class<?> |
getProxiedClass(java.lang.Object o)* Get the class being proxied *
|
|
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)* Checks whether the specified instance is a proxy * *
|
|
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#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
returns the proxy for an association. returns null if its not a proxy. Note: Only used in a test. Deprecate?
* Obtains the identifier of an object without initializing the proxy if it is one *
obj - The object
** Get the class being proxied *
o - The object
*Force initialization of a proxy or persistent collection. * Initialises the given object *
o - The object to initializeCheck if the proxy or persistent collection is initialized. * Checks whether a given proxy is initialized *
object - The object to check
*Check if an association proxy or persistent collection is initialized. * Checks whether the given association name of the given object is initialized * *
object - The object to check The object to check
** Checks whether the specified instance is a proxy * *
object - The object to check
*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. * Unwraps the given proxy if it is one *
object - The object
*calls unwrap which calls unproxy