Last modified 14 years ago Last modified on 12/05/08 13:44:34

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=S2S_PERSISTENCE_COMMONS_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance) failed
current transaction is aborted, commands ignored until end of transaction block



New module of the sophie2 project, used as an API to access a database from the server module. Will provide interface to the "server core" layer to persist, save to the database, search for and delete data.

Task requirements

  • Write basic server persistence module to the extend needed by the other tasks in Revision 0.
    • the persistence API should communicate with the Database(to select and update information)
    • it should give the interface for easier manipulation with users and groups.
  • Write good JUnit test that test all of the logic written.
  • Write a flexible interface to the database API, that can be changed easily.
  • Write the basic schema of the database and think of a way to store the creation logic in a good place.

Task result

The result will be a database module in initial state, which will be able to store and retrieve the data needed by the server core's security services. JUnit tests. Initial schema of the database.

Implementation idea

The persistence module will contain Data Access managers with methods like :

void saveEntity(Entity myEntity) {...}
void getEntityByField(String field) {...}
void persistEntity(Entity myEntity)

etc.. The managers will query the database directly using Database Access provider written for the purpose, that will be changeable. The API will be work with the generated Database Schema to the extend it is written.

The schema must be useful for #1293

How to demo

See that the written logic connects to the database properly and creates the Database Schema. The module can successfully persist, update, delete and search for data in the chosen database.


  • The DatabaseManager and Data Access Objects should be implemented using the Singleton pattern.

  • The DatabaseSchema statements should be implemented using the database diagram:


  • the implementation should be made using the basic persistence class diagram:


  • Here are the tests for the new persistence module created: 602


  • This demo is for helping to get into the derby database:



The implementation is in 602 and 609.



(Write comments for this or later revisions here.)