@CompileStatic class GroovyProxyFactory extends Object implements ProxyFactory
Implements the proxy interface and creates a Groovy proxy by passing the need for javassist style proxies and all the problems they bring.
| Constructor and description |
|---|
GroovyProxyFactory() |
| Type Params | Return Type | Name and description |
|---|---|---|
<T> |
T |
createProxy(Session session, Class<T> type, Serializable key)Creates a proxy |
<T, K extends Serializable> |
T |
createProxy(Session session, AssociationQueryExecutor<K, T> executor, K associationKey) |
|
protected Serializable |
getIdDynamic(Object obj) |
|
Serializable |
getIdentifier(Object obj) |
|
Class<?> |
getProxiedClass(Object o) |
|
protected ProxyInstanceMetaClass |
getProxyInstanceMetaClass(Object object) |
|
void |
initialize(Object o) |
|
boolean |
isInitialized(Object object) |
|
boolean |
isInitialized(Object object, String associationName) |
|
boolean |
isProxy(Object object)Check our object has the correct meta class to be a proxy of this type. |
<T> |
protected MetaClass |
resolveTargetMetaClass(T proxy, Class<T> type) |
|
Object |
unwrap(Object object) |
Creates a proxy
T - The type of the proxy to createsession - The session instancetype - The type of the proxy to createkey - The key to proxyCheck our object has the correct meta class to be a proxy of this type.
object - The object.