package com.db4o.samples;

import com.db4o.*;
import com.db4o.lib.Logger;

public class S05_Get_By_Class
{
	public static void main(String[] args)
	{
		ObjectContainer db = Db4o.openFile("samples.yap");
		Logger.log("*** S05 Retrieving all objects of class Adress");


		ObjectSet os = db.get(new Address());
		// A first introduction to Query-By-Example:
		// What you give is what you get!
		// If you specify an object, with no members set,
		// you get all objects of the class.


		while(os.hasNext()){
			Logger.log(db, os.next());
		}
		db.close();
	}
}
