Chapter 3. Getting Started with JDO


"The expert at anything was once a beginner."

Hayes

Using JDO to build an application that creates, reads, updates, and deletes persistent instances of Java classes is easy and requires only some basic knowledge about how JDO works and how to use it. Armed with this knowledge, you can develop your first JDO application and persist instances of Java classes transparently in a datastore. This chapter is a guide to getting started with JDO, providing an understanding of how JDO works and how to use the basic APIs, and exploring some of the more advanced concepts related to using JDO.

This chapter covers these topics:

  • How JDO is able to transparently persist instances of Java classes.

  • The basic JDO interfaces and how they are related.

  • How to define a Java class that can be used with a JDO implementation.

  • How to connect to a datastore.

  • How to create, read, update, and delete persistent objects.

  • The types of fields, system classes, collection classes, and inheritance supported by JDO.

  • How to handle exceptions within an application.

  • The concept of object identity.

  • The different types of identity that can be used.

  • How concurrency control is enforced between multiple applications.

The examples for this chapter can be downloaded from the Internet at www.corejdo.com and are located in the com.corejdo.examples.chapter3 package. In many cases, the code snippets shown are simplified versions of the actual classes to allow the examples to focus only on the relevant concepts.



Core Java Data Objects
Core Java Data Objects
ISBN: 0131407317
EAN: 2147483647
Year: 2003
Pages: 146

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