Section 20.1. The Sample Application


20.1. The Sample Application

In order to focus on the features and requirements of Hibernate, we are using a relatively simple application as an example. The application will track the students, professors, classes, and departments of a university. Through this framework, we'll be able to demonstrate the configuration, mapping, and manipulation of persistent domain objects.

The application will consist of five major domain classes:


Department

Will contain multiple classes and professors but no students


UniversityClass

Will have a single professor and multiple students, will belong to a single department, and will have a single syllabus


Syllabus

Will belong to a UniversityClass; every Syllabus will be unique to a specific UniversityClass


Professors

Will teach one or more classes but have a single primary department


Students

Will attend multiple classes but have no formal association with either a Professor or a Department

In addition, we'll introduce the Person interface to serve as a common ancestor between Professor and Student. Last, we need to add a layer to manage persistent domain objects. For other applications, you might decide to add a Data Access Object (DAO) with a façade layer on top. We decided that a DAO layer was overkill for such a small application, so we omitted it.



Java Enterprise in a Nutshell
Java Enterprise in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596101422
EAN: 2147483647
Year: 2004
Pages: 269

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net