package com.db4o.samples;

import com.db4o.*;
import com.db4o.lib.Logger;

public class S04_Get_All
{
	public static void main(String[] args)
	{
		ObjectContainer db = Db4o.openFile("samples.yap");
		Logger.log("*** S04 Retrieving all objects");


		ObjectSet os = db.get(null);
		// a null parameter passed to db.get requests all stored objects

		
		while(os.hasNext()){
		// db4o collection functionality is similar to JDK 1.2 Collections


			Logger.log(db,os.next());
			// the Logger provides a convenient way
			// to analyze the public data of objects


		}
		db.close();
	}
}

