public class OObjectProxyMethodHandler extends Object implements javassist.util.proxy.MethodHandler
Modifier and Type | Field and Description |
---|---|
protected ODocument |
doc |
protected Map<String,Integer> |
loadedFields |
protected Set<ORID> |
orphans |
protected javassist.util.proxy.ProxyObject |
parentObject |
protected boolean |
reading |
Constructor and Description |
---|
OObjectProxyMethodHandler(ODocument iDocument) |
Modifier and Type | Method and Description |
---|---|
void |
attach(Object self)
Method that attaches all data contained in the object to the associated document
|
protected void |
convertArray(Object[] value,
Object[] newValue,
boolean isEnum) |
protected Object |
convertDocumentToObject(ODocument value,
Object self) |
void |
detach(Object self,
boolean nonProxiedInstance)
Method that detaches all fields contained in the document to the given object
|
void |
detachAll(Object self,
boolean nonProxiedInstance,
Map<Object,Object> alreadyDetached,
Map<Object,Object> lazyObjects)
Method that detaches all fields contained in the document to the given object
|
ODocument |
getDoc() |
protected Object |
getDocFieldValue(Object self,
String fieldName) |
Set<ORID> |
getOrphans() |
javassist.util.proxy.ProxyObject |
getParentObject() |
protected Method |
getSetMethod(Class<?> iClass,
String fieldName,
Object value) |
protected String |
getSetterFieldName(String fieldName) |
protected Object |
getValue(Object self,
String fieldName,
boolean idOrVersionField,
Object value) |
protected Object |
getValue(Object self,
String fieldName,
boolean idOrVersionField,
Object value,
boolean iIgnoreLoadedFields) |
Object |
invoke(Object self,
Method m,
Method proceed,
Object[] args) |
protected Object |
lazyLoadField(Object self,
String fieldName,
Object docValue,
Object currentValue) |
protected Object |
manageArrayFieldObject(Field field,
Object self,
Object value) |
protected Object |
manageArrayLoad(Object value,
Field f) |
protected Object |
manageArraySave(String iFieldName,
Object[] value) |
protected Object |
manageCollectionLoad(Field f,
Object self,
Object value,
boolean customSerialization) |
protected Object |
manageCollectionSave(Object self,
Field f,
Collection<?> value,
boolean customSerialization,
boolean isFieldUpdate) |
protected Object |
manageEnumCollections(Object self,
String fieldName,
Class<?> enumClass,
Object value) |
protected Object |
manageGetMethod(Object self,
Method m,
Method proceed,
Object[] args) |
protected Object |
manageMapLoad(Field f,
Object self,
Object value,
boolean customSerialization) |
protected Object |
manageMapSave(Object self,
Field f,
Map<?,?> value,
boolean customSerialization) |
protected Object |
manageObjectCollections(Object self,
String fieldName,
Object value) |
protected Object |
manageSerializedCollections(Object self,
String fieldName,
Object value) |
protected Object |
manageSetMethod(Object self,
Method m,
Method proceed,
Object[] args) |
void |
setDirty() |
void |
setDoc(ODocument iDoc) |
protected Object |
setDocFieldValue(String fieldName,
Object value,
OType type) |
void |
setParentObject(javassist.util.proxy.ProxyObject parentDoc) |
protected Object |
setValue(Object self,
String fieldName,
Object valueToSet) |
void |
updateLoadedFieldMap(Object proxiedObject,
boolean iReload) |
protected ODocument doc
protected javassist.util.proxy.ProxyObject parentObject
protected boolean reading
public OObjectProxyMethodHandler(ODocument iDocument)
public ODocument getDoc()
public void setDoc(ODocument iDoc)
public javassist.util.proxy.ProxyObject getParentObject()
public void setParentObject(javassist.util.proxy.ProxyObject parentDoc)
public Object invoke(Object self, Method m, Method proceed, Object[] args) throws Throwable
invoke
in interface javassist.util.proxy.MethodHandler
Throwable
public void detach(Object self, boolean nonProxiedInstance) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
self
- :- The object containing this handler instanceInvocationTargetException
IllegalAccessException
NoSuchMethodException
public void detachAll(Object self, boolean nonProxiedInstance, Map<Object,Object> alreadyDetached, Map<Object,Object> lazyObjects) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
self
- :- The object containing this handler instanceInvocationTargetException
IllegalAccessException
NoSuchMethodException
public void attach(Object self) throws IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
self
- :- The object containing this handler instanceIllegalAccessException
IllegalArgumentException
InvocationTargetException
NoSuchMethodException
public void setDirty()
public void updateLoadedFieldMap(Object proxiedObject, boolean iReload)
protected Object manageGetMethod(Object self, Method m, Method proceed, Object[] args) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException, SecurityException, IllegalArgumentException, NoSuchFieldException
protected Object getValue(Object self, String fieldName, boolean idOrVersionField, Object value) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
protected Object getValue(Object self, String fieldName, boolean idOrVersionField, Object value, boolean iIgnoreLoadedFields) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
protected Object manageObjectCollections(Object self, String fieldName, Object value) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
protected Object manageSerializedCollections(Object self, String fieldName, Object value) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
protected Object manageEnumCollections(Object self, String fieldName, Class<?> enumClass, Object value) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
protected Object manageMapSave(Object self, Field f, Map<?,?> value, boolean customSerialization)
protected Object manageCollectionSave(Object self, Field f, Collection<?> value, boolean customSerialization, boolean isFieldUpdate)
protected Object lazyLoadField(Object self, String fieldName, Object docValue, Object currentValue) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
protected Object manageMapLoad(Field f, Object self, Object value, boolean customSerialization)
protected Object manageCollectionLoad(Field f, Object self, Object value, boolean customSerialization)
protected Object manageArrayFieldObject(Field field, Object self, Object value)
protected Object manageSetMethod(Object self, Method m, Method proceed, Object[] args) throws IllegalAccessException, InvocationTargetException
protected Method getSetMethod(Class<?> iClass, String fieldName, Object value) throws NoSuchMethodException
NoSuchMethodException
Copyright © 2009–2020 OrientDB. All rights reserved.