code: public void apply()
      {
          System.out.println("The list of available products:");
          // build a query that select all objects of Class Product, without any further criteria
          // according to ODMG the Collection containing all instances of a persistent class is called "Extent"
          Query query = new QueryByCriteria(Product.class, null);
          try
          {
              // ask the broker to retrieve the Extent collection
              Collection allProducts = broker.getCollectionByQuery(query);
              // now iterate over the result to print each product
              java.util.Iterator iter = allProducts.iterator();
              while (iter.hasNext())
              {
                  System.out.println(iter.next());
              }
          }
          catch (Throwable t)
          {
              t.printStackTrace();
          }
      }
docs: perform this use case