db4o

IDb4oCollections.NewIdentityHashMap Method 

creates a new database-aware IdentityHashMap.

IDb4oMap NewIdentityHashMap(
   int initialSize
);

Parameters

initialSize
the initial size of the HashMap

Return Value

Db4objects.Db4o.Types.IDb4oMap

Remarks

creates a new database-aware IdentityHashMap.

Only first class objects already stored to the ObjectContainer (Objects with a db4o ID) can be used as keys for this type of Map. The internal db4o ID will be used as the hash value.

Usage:
- declare a

java.util.Map
variable in your persistent class.
- fill the variable with this method.

Example:

            class MyClass{
            Map myMap;
            }
            MyClass myObject = new MyClass();
            myObject.myMap = objectContainer.ext().collections().newIdentityMap(0);


See Also

IDb4oCollections Interface | Db4objects.Db4o.Types Namespace | Db4objects.Db4o.Types.IDb4oMap