| |
|
| com.db4o.types.Db4oCollections
All known Subclasses: com.db4o.P2Collections,
Db4oCollections | public interface Db4oCollections (Code) | | factory and other methods for database-aware collections.
|
Method Summary | |
public Db4oMap | newHashMap(int initialSize) creates a new database-aware HashMap.
This map will call the hashCode() method on the key objects to calculate the
hash value. | public Db4oMap | newIdentityHashMap(int initialSize) 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. | public Db4oList | newLinkedList() creates a new database-aware linked list. |
newHashMap | public Db4oMap newHashMap(int initialSize)(Code) | | creates a new database-aware HashMap.
This map will call the hashCode() method on the key objects to calculate the
hash value. Since the hash value is stored to the ObjectContainer, key objects
will have to return the same hashCode() value in every VM session.
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().newHashMap(0);
Parameters: initialSize - the initial size of the HashMap Db4oMap See Also: Db4oMap |
newIdentityHashMap | public Db4oMap newIdentityHashMap(int initialSize)(Code) | | 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);
Parameters: initialSize - the initial size of the HashMap Db4oMap See Also: Db4oMap |
newLinkedList | public Db4oList newLinkedList()(Code) | | creates a new database-aware linked list.
Usage:
- declare a java.util.List variable in your persistent class.
- fill this variable with this method.
Example:
class MyClass{
List myList;
}
MyClass myObject = new MyClass();
myObject.myList = objectContainer.ext().collections().newLinkedList();
Db4oList See Also: Db4oList |
|
|
|