db4o 8.0

com.db4o.collections
Class CollectionFactory

java.lang.Object
  extended by com.db4o.collections.CollectionFactory

public class CollectionFactory
extends java.lang.Object

Collection factory with methods to create collections with behaviour that is optimized for db4o.

Example usage:
CollectionFactory.forObjectContainer(objectContainer).newBigSet();


Method Summary
static CollectionFactory forObjectContainer(ObjectContainer objectContainer)
          returns a collection factory for an ObjectContainer
<E> java.util.Set<E>
newBigSet()
          creates a new BigSet.

Characteristics of BigSet:
- It is optimized by using a BTree of IDs of persistent objects.
- It can only hold persistent first class objects (no primitives, no strings, no objects that are not persistent)
- Objects are activated upon getting them from the BigSet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forObjectContainer

public static CollectionFactory forObjectContainer(ObjectContainer objectContainer)
returns a collection factory for an ObjectContainer

Parameters:
objectContainer - - the ObjectContainer
Returns:
the CollectionFactory

newBigSet

public <E> java.util.Set<E> newBigSet()
creates a new BigSet.

Characteristics of BigSet:
- It is optimized by using a BTree of IDs of persistent objects.
- It can only hold persistent first class objects (no primitives, no strings, no objects that are not persistent)
- Objects are activated upon getting them from the BigSet.

BigSet is recommend whenever one object references a huge number of other objects and sorting is not required.

Returns:

db4o 8.0

Copyright 2009 Versant Corporation. All rights reserved.