Package de.nava.informa.utils.manager

This package contains definition of Persistence Manager interface.

See:
          Description

Interface Summary
PersistenceManagerIF General interface for all persistence managers.
 

Class Summary
PersistenceManagerConfig Persistence manager configuration class.
 

Exception Summary
PersistenceManagerException Exception thrown by PersistenceManagerIF implementations.
 

Package de.nava.informa.utils.manager Description

This package contains definition of Persistence Manager interface. It also holds configuration class (PersistentManagerConfig), which should be used to establish instances of managers indirectly.

Persistence Manager is a front-end for persistence model implemented in Informa. It provides convenient and implementation independend ways to operate with data located in persistent storage. Different implementations of interface can be provided to support different types of storage (Memory, Database, plain and XML files, etc).

Concrete implementations of manager interface reside deeper in package hierarchy, but can be easily moved anywhere in code.

Note for Persistence Manager implementation developers!
There's an acceptance test developed to help you with making sure that your implementation does what's expected. When you develop your own implementation make sure that it passes at least the acceptance test. In order to do so you should create your own test case and extend TestAbstractPersistenceManager with it, like below.


// header skipped
package de.nava.informa.utils.manager.memory;

// imports skipped

/**
 * In-Memory persistence manager test.
 *
 * @see PersistenceManager
 * @author Aleksey Gureev (spyromus@noizeramp.com)
 */
public class TestMemoryPersistenceManager extends TestAbstractPersistenceManager {
  /**
   * Returns manager to be tested.
   *
   * @return manager to be tested.
   */
  protected PersistenceManagerIF getManager() {
    return new PersistenceManager();
  }
}

You can see that this is very simple. If you need your own additional tests to be run then just put them below as usual.



Copyright © 2002-2007 Niko Schmuck. All Rights Reserved.