You are here: Basics Operations & Concepts > Transparent Activation/Persistence > Collections

Collections

In order to support transparent persistence properly a class needs to implement the Activatable-interface. For your domain classes this is easy to archive. But what about the Java-collections? Wouldn't it be nice when collections also work together the transparent activation framework?

db4o brings special, transparent persistence aware collections with it. This collections load the content only when the collections is actually used.

These collections are currently implemented:

It's recommended to use the collection-interfaces wherever possible instead of the concrete classes. This avoids unnecessary direct dependencies on the implementations and makes it easy to exchange the implementations.

The enhancement tools can automatically replace the Java-collections with the db4o-equivalent. However there are few rules and limitations. See "Enhance Collections"

You can use the db4o-collection directly in your code. For example in the case you implement the transparent activation support manually. Take a looks these tips: See "Using Transparent Activatable Collections Directly"