Class 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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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

        clone, equals, finalize, 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: