Package org.springmodules.db4o.examples

Examples of org.springmodules.db4o.examples.Pilot


    ObjectSet result = db.get(proto);
    listResult(result);
  }

  public static void retrievePilotByExactPoints(ObjectContainer db) {
    Pilot proto = new Pilot(null, 100);
    ObjectSet result = db.get(proto);
    listResult(result);
  }
View Full Code Here


    ObjectSet result = db.get(proto);
    listResult(result);
  }

  public static void updatePilot(ObjectContainer db) {
    ObjectSet result = db.get(new Pilot("Michael Schumacher", 0));
    Pilot found = (Pilot) result.next();
    found.addPoints(11);
    db.set(found);
    System.out.println("Added 11 points for " + found);
    retrieveAllPilots(db);
  }
View Full Code Here

    System.out.println("Added 11 points for " + found);
    retrieveAllPilots(db);
  }

  public static void deleteFirstPilotByName(ObjectContainer db) {
    ObjectSet result = db.get(new Pilot("Michael Schumacher", 0));
    Pilot found = (Pilot) result.next();
    db.delete(found);
    System.out.println("Deleted " + found);
    retrieveAllPilots(db);
  }
View Full Code Here

    System.out.println("Deleted " + found);
    retrieveAllPilots(db);
  }

  public static void deleteSecondPilotByName(ObjectContainer db) {
    ObjectSet result = db.get(new Pilot("Rubens Barrichello", 0));
    Pilot found = (Pilot) result.next();
    db.delete(found);
    System.out.println("Deleted " + found);
    retrieveAllPilots(db);
  }
View Full Code Here

TOP

Related Classes of org.springmodules.db4o.examples.Pilot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.