Store Pilots

SimpleExamples.java: storePilots
01private static void storePilots() { 02 new File(DB4O_FILE_NAME).delete(); 03 ObjectContainer container = database(); 04 if (container != null) { 05 try { 06 Pilot pilot; 07 for (int i = 0; i < OBJECT_COUNT; i++) { 08 pilot = new Pilot("Test Pilot #" + i, i); 09 container.set(pilot); 10 } 11 for (int i = 0; i < OBJECT_COUNT; i++) { 12 pilot = new Pilot("Professional Pilot #" + (i + 10), i + 10); 13 container.set(pilot); 14 } 15 container.commit(); 16 } catch (Db4oException ex) { 17 System.out.println("Db4o Exception: " + ex.getMessage()); 18 } catch (Exception ex) { 19 System.out.println("System Exception: " + ex.getMessage()); 20 } finally { 21 closeDatabase(); 22 } 23 } 24 }