copyright © 2000 is.com

This tutorial starts simple and gets more complex to give a more in-depth view of what can be done with this framework.  This uses a  relatively simple video store database example.  The working source code for this tutorial can be found in the examples directory of the distribution zip file.

1. Basic example

Customer table columns used in this example:

In general, it is easiest if there is a one-to-one relationship between persistent object classes and tables.  Let's say we have a Customer table already built and we want to create a Customer class whose instances will be equivalent to a row in the Customer table.  We would do the following:

  1. Create a Customer class that subclasses com.is.jrf.PersistentObject.
  2. Create a CustomerDomain class that subclasses com.is.jrf.AbstractDomain.
  3.        public List findForName(String s)
Assuming this compiles and the table and column metadata are defined correctly, we can now do some pretty cool things like below:


2.  Let's get more complicated

3. Let's get really complicated

main page
noticed a document error?
copyright © 2000 is.com