wiki:BASE_PERSISTENCE_COMMONS_R0
Last modified 16 years ago Last modified on 01/28/09 15:40:34

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

Error: Macro TicketQuery(summary=BASE_PERSISTENCE_COMMONS_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

This task should provide a class structure for persisting books with all their elements.

Task requirements

  • Revise the current code for persisting that is in org.sophie2.main.model module.
  • Create a class diagram(s) for the class structure related to persistence.
  • Modularize to the base.persistence module.
  • Review the existing unit tests and fix them if needed.

Task result

The result of this task should be:

  • source code
  • class diagram(s)
  • working unit tests

Implementation idea

  • Review the existing source code.
  • Create the class diagram(s).
  • Refactor and clean up according to the diagram.
  • Run unit tests and fix problems if any.

How to demo

  • Show the class diagrams and explain them.
  • Show the source code related to persistence.
  • Run unit tests to demonstrate the model.

Design

  • Library classes for persistence (i.e. that are not related specifically to books) will be separated in the org.sophie2.base.persistence module.
    • The base.persistence module will depend on base.
  • The book formats will be separated into two new modules - org.sophie2.main.model.book.format.rX, where X is 1 or 2 for each format.
    • these modules will depend on base, base.persistence, base.model.book and main.model.
  • Classes that are in org.sophie2.main.model.book.store.resource* packages will be removed.
  • Existing unit tests will be reviewed and moved to their new location. Currently the tests are in trunk/sophie2-platform/modules/org.sophie2.main.model/src/test/java/org/sophie2/main/model/persist/ and need revising since almost all of them fail.
  • All classes that are no longer used will be removed (such are BookStorager and BookZipFormat for example).
  • Below are the dependency and class diagrams that reflect the new hierarchy:

source:/trunk/sophie2-platform/doc/uml-design-diagrams/Persistence-Dependency-Diagram.png source:/trunk/sophie2-platform/doc/uml-design-diagrams/Persistence-Class-Diagram.png

Implementation

(Implementation results should be described and linked here (from the wiki or the repository))

Testing

Comments

  • All important wiki content should be put in the corresponding section of a wiki page => BASE_PERSISTENCE