| com.db4o.config.ObjectConstructor
All known Subclasses: com.db4o.config.TTreeSet, com.db4o.test.types.TCustomConstructor, com.db4o.f1.chapter6.NotStorableTranslator, com.db4o.config.TTransient, com.db4o.config.TSerializable, com.db4o.config.TTreeMap, com.db4o.config.TClass,
ObjectConstructor | public interface ObjectConstructor extends ObjectTranslator(Code) | | interface to allow instantiating objects by calling specific constructors.
By writing classes that implement this interface, it is possible to
define which constructor is to be used during the instantiation of a stored object.
Before starting a db4o session, translator classes that implement the
ObjectConstructor or
ObjectTranslator ObjectTranslator need to be registered.
Example:
Configuration config = Db4o.configure();
ObjectClass oc = config.objectClass("package.className");
oc.translate(new FooTranslator());
|
onInstantiate | public Object onInstantiate(ObjectContainer container, Object storedObject)(Code) | | db4o calls this method when a stored object needs to be instantiated.
Parameters: container - the ObjectContainer used Parameters: storedObject - the object stored with ObjectTranslator.onStore ObjectTranslator.onStore. the instantiated object. |
|
|