Display Elements
CD-DisplayElements.png
  • A DisplayElement can be mapped to one or more groups. The Many-to-many relationship is recorded in a separate DB table that isn't important to the class structure, but is shown here to illustrate and document which entity holds that relationship.
  • Currently, I'm using a single group for each quarterly bike train. The name supplied in the tag (group=<displayName>) is matched with the DisplayName field of the DisplayGroup.
  • The className of the DisplayElement matches the actual class that is persisted to the database. The DAO helps retrieve this record from the database and instantiate an object with the data by virtue of the relationships defined in the Hibernate annotations.
  • The service method also has responsibility to instantiate the EncodedTrack and make it part of the specific BikeTrainDE instance.

Persistence

  • Hibernate is used to persist these classes.
  • Code is generated by hand, and then turned into a working schema using annotations.
  • Once the module is settled, a copy of the class is then placed in a package visible to the "client" side of the house.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License