Posts tagged persistence
Using JPA to persist the Tour de France Java Object Graph to relational database tables
1In a recent article – http://technology.amis.nl/blog/12786/building-java-object-graph-with-tour-de-france-results-using-screen-scraping-java-util-parser-and-assorted-facilities – I described how I retrieved the statistics for recent Tour de France editions from the official Tour de France website from my Java program and constructed an Java Object Graph for the data on stages, riders and rankings. In this article, I will show how I have persisted that data, from the Java Objects to Relational Tables in my local Oracle XE database. Note: the fact that this concerns Tour de France data is not really relevant for this story – it is a generic story about how JPA is used to map and persist Java Classes and Objects to a relational database.
The Class diagram for the classes involved looks like this:
The Java program discussed in the previous article retrieves data from the Le Tour De France website and creates an Object Graph according to these object definitions. Note: in comparison with the previous article, I have already applied a few small changes that will help with othe ORM mapping that JPA will do for me. The stage and rider references in Standing as well as the tour references More >
Recent Comments