List of Listings


Chapter 1: Basic Concepts in JDO

Listing 1-1: A Person and His or Her Dog
Listing 1-2: Storing Modifications Upon Transaction Commit
Listing 1-3: The Heffalump Class and Its Application Identity Class

Chapter 2: Queries

Listing 2-1: The Persistent Fields of the Foo and Bar Classes
Listing 2-2: The Persistent Fields of the Song and Label Classes
Listing 2-3: The Persistent Fields of the Library Classes
Listing 2-4: The Relational Tables for the Library Classes

Chapter 5: Enhanced Classes and Managed Fields

Listing 5-1: Sample No-Arg Constructor for Typical Application Data Class
Listing 5-2: Library Classes with Judicious Use of the transient Keyword
Listing 5-3: A Shallow clone Method for an Application Data Class
Listing 5-4: Simple JDO Metadata File
Listing 5-5: The JDO Metadata for the Library Example

Chapter 6: Factories that Produce Persistence Managers

Listing 6-1: Getting a PersistenceManager from a Connection Factory
Listing 6-2: Obtaining a PersistenceManagerFactory from JDOHelper
Listing 6-3: Example of a Properties File Used to Obtain a PersistenceManagerFactory
Listing 6-4: Code to Find a PersistenceManagerFactory in JNDI
Listing 6-5: Finding a ConnectionFactory in JNDI
Listing 6-6: Example of a CMT Session Bean That Uses JDO
Listing 6-7: Example of a BMP Entity Bean That Uses JDO
Listing 6-8: Example of Stateless BMT Session Bean That Uses JDO
Listing 6-9: Example of Stateful BMT Session Bean That Uses JDO

Chapter 7: Helpers, Callbacks, and Exceptions

Listing 7-1: Transient State Dependent on Persistent State
Listing 7-2: The Apple Class Captures the Identity String for a Datastore Identity
Listing 7-3: Deleting a Banana Split and the Objects That Compose It
Listing 7-4: Handling a Failed Optimistic Transaction
Listing 7-5: Handling All Exceptions When Explicitly Using JDO
Listing 7-6: Handling All Exceptions When Implicitly Using JDO

Chapter 8: Using JDO to Learn More

Listing 8-1: Expected Output from Running ant -projecthelp at the Command Line
Listing 8-2: Expected Output from Running ant testjdohelper
Listing 8-3: Expected Output from Running ant testfactory
Listing 8-4: Expected Output from Running ant megacups
Listing 8-5: Sample Output from the MegaCups Program
Listing 8-6: Expected Output from Running ant library
Listing 8-7: Example of Help Output from the Library Program
Listing 8-8: User Commands to Find All the Categories That Interest Tom
Listing 8-9: The Persistent Fields of the Apple Class
Listing 8-10: Expected Output from Running ant statetracker
Listing 8-11: Example of Help Output from the StateTracker Program
Listing 8-12: User Commands to Create a New McIntosh Apple with Three Worms
Listing 8-13: Sample Output from Committing the New McIntosh Apple
Listing 8-14: Sample Output from Snooping on the Hollow Apple

Chapter 9: Using JDO in a Swing Application

Listing 9-1: Selected Output from Running ant rental-gui

Chapter 10: Using JDO in a Web Application

Listing 10-1: Expected Output from Building the clean-out Target
Listing 10-2: Expected Output from Building the rental-servlet-opr Target
Listing 10-3: Excerpt from maine.jsp Where the Rental Table Rows Are Generated
Listing 10-4: The flipReservations Method of the ReservationService
Listing 10-5: Implementation of the SupportsIdentityString Interface in the Rental Class
Listing 10-6: Implementation of the SupportsVersion Interface in the Rental Class
Listing 10-7: The equals and hashCode Methods for the Rental Application Data Class

Chapter 11: Using JDO in Enterprise JavaBeans

Listing 11-1: Excerpts of Expected Output from Building the rental-servlet-ejb Target
Listing 11-2: Expected End of Output from Building the sayings-stateless-cmt Target




Using and Understanding Java Data Objects
Using and Understanding Java Data Objects
ISBN: 1590590430
EAN: 2147483647
Year: 2005
Pages: 156
Authors: David Ezzio

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