Class ReferenceProxy
- java.lang.Object
-
- dev.morphia.mapping.codec.references.ReferenceProxy
-
- All Implemented Interfaces:
MorphiaProxy
,InvocationHandler
public class ReferenceProxy extends Object implements MorphiaProxy, InvocationHandler
The proxy for lazy references.Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
invoke(Object proxy, Method method, Object[] args)
boolean
isFetched()
<T> T
unwrap()
-
-
-
Method Detail
-
invoke
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
isFetched
public boolean isFetched()
- Specified by:
isFetched
in interfaceMorphiaProxy
- Returns:
- true if the reference has been fetched
-
unwrap
public <T> T unwrap()
- Specified by:
unwrap
in interfaceMorphiaProxy
- Type Parameters:
T
- the reference type- Returns:
- the bare reference
-
-