Chapter 2. Setup

2.1. Tutorial Files
2.2. Important Utilities

If you haven't already, follow the instructions in the Kodo JDO README.txt. This will ensure that your CLASSPATH and other environmental variables are set up correctly. Once you've completed the installation instructions, change into the reversetutorial directory.

2.1. Tutorial Files

The tutorial uses the following files:

  • The reversetutorial_database.properties, reversetutorial_database.script, and reversetutorial_database.data: These files make up a Hypersonic SQL file-based database with the schema outlined above. The database is already populated with lots of magazine data representing your shop's inventory.

  • reversetutorial.JDOFactory: Provides access to a properly configured javax.jdo.PersistenceManagerFactory .

    The PersistenceManagerFactory class is the main entry point into the JDO framework. Persistence manager factories provide a mechanism for obtaining individual PersistenceManager instances, through which a user can find objects in the underlying data store. See the javax.jdo Javadoc for a more in-depth discussion of JDO in general and the PersistenceManagerFactory class in particular.

  • reversetutorial.Finder: Uses JDO to execute user-supplied query strings and output the matching persistent objects. This class relies on persistent classes that we haven't generated yet, so it won't compile immediately.

  • kodo.properties : Properties file containing Kodo-specific and standard JDO configuration settings.

    For this tutorial, make sure the following properties are set to the given values:

    javax.jdo.option.ConnectionDriverName=org.hsqldb.jdbcDriver
    javax.jdo.option.ConnectionUserName=sa
    javax.jdo.option.ConnectionPassword=
    javax.jdo.option.ConnectionURL=jdbc:hsqldb:reversetutorial_database
    

    [Important]Important

    You must specify a valid Kodo license key in the kodo.properties file.

  • solutions: Contains the complete solutions to this tutorial, including all generated code.