Package com.db4o.config
Class TSerializable
- java.lang.Object
-
- com.db4o.config.TSerializable
-
- All Implemented Interfaces:
ObjectConstructor
,ObjectTranslator
public class TSerializable extends java.lang.Object implements ObjectConstructor
-
-
Constructor Summary
Constructors Constructor Description TSerializable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onActivate(ObjectContainer con, java.lang.Object object, java.lang.Object members)
db4o calls this method during activation.java.lang.Object
onInstantiate(ObjectContainer con, java.lang.Object storedObject)
db4o calls this method when a stored object needs to be instantiated.java.lang.Object
onStore(ObjectContainer con, java.lang.Object object)
db4o calls this method during storage and query evaluation.java.lang.Class
storedClass()
return the Class you are converting to.
-
-
-
Method Detail
-
onStore
public java.lang.Object onStore(ObjectContainer con, java.lang.Object object)
Description copied from interface:ObjectTranslator
db4o calls this method during storage and query evaluation.- Specified by:
onStore
in interfaceObjectTranslator
- Parameters:
con
- the ObjectContainer usedobject
- the Object to be translated- Returns:
- return the object to store.
It needs to be of the classObjectTranslator.storedClass()
.
-
onActivate
public void onActivate(ObjectContainer con, java.lang.Object object, java.lang.Object members)
Description copied from interface:ObjectTranslator
db4o calls this method during activation.- Specified by:
onActivate
in interfaceObjectTranslator
- Parameters:
con
- the ObjectContainer usedobject
- the object to set the members onmembers
- the object that was stored
-
onInstantiate
public java.lang.Object onInstantiate(ObjectContainer con, java.lang.Object storedObject)
Description copied from interface:ObjectConstructor
db4o calls this method when a stored object needs to be instantiated.- Specified by:
onInstantiate
in interfaceObjectConstructor
- Parameters:
con
- the ObjectContainer usedstoredObject
- the object stored withObjectTranslator.onStore
.- Returns:
- the instantiated object.
-
storedClass
public java.lang.Class storedClass()
Description copied from interface:ObjectTranslator
return the Class you are converting to.- Specified by:
storedClass
in interfaceObjectTranslator
- Returns:
- the Class of the object you are returning with the method
ObjectTranslator.onStore(ObjectContainer, Object)
-
-