After an instance has been made persistent and its fields stored in the datastore, it can be retrieved again, either within the same application or by a different application.
There are three primary ways of finding an instance in the datastore with JDO—by navigation, via an Extent, or by a Query.
Retrieving an instance by navigation is simple. Extending the previous example, this code snippet taken from ReadByNavigationExample.java shows how the Author instance can be retrieved again in the next transaction simply by using it:
tx.begin(); String name = author.getName(); System.out.println("Author's name is '" + name + "'."); tx.commit();
Underneath the covers, the JDO implementation retrieves ...