Package org.conserve

Examples of org.conserve.PersistenceManager.saveObject()


    persist.saveObject(foo);
    ConcreteBar2 bar2 = new ConcreteBar2();
    bar2.setAbstractName("f");
    bar2.setConcreteName("C");
    foo.setBar(bar2);
    persist.saveObject(foo);
    persist.close();

    persist = new PersistenceManager(driver, database, login, password);

    // assert that there are no ConcreteBar1 objects
View Full Code Here


    {
      array[x].setFoo((double) (x + 1));
    }
    ComplexObject co = new ComplexObject();
    co.setObject(array);
    persist.saveObject(co);
    // close the persistence object
    persist.close();

    // re-open the persistence object
    persist = new PersistenceManager(driver, database, login, password);
View Full Code Here

    {
      array[1][x].setFoo((double) (x + 1));
    }
    ComplexObject co = new ComplexObject();
    co.setObject(array);
    persist.saveObject(co);
    // close the persistence object
    persist.close();

    // re-open the persistence object
    persist = new PersistenceManager(driver, database, login, password);
View Full Code Here

  {
    ArrayList<Double> foo = new ArrayList<Double>();
    foo.add(6.9);
    foo.add(1.1);
    PersistenceManager persist = new PersistenceManager(driver, database, login, password);
    persist.saveObject(foo);
    List<Object> all = persist.getObjectsMatching(new Object());
    assertEquals(1, all.size());
    persist.close();
  }
View Full Code Here

  {
    ArrayList<Double> foo = new ArrayList<Double>();
    foo.add(6.9);
    foo.add(1.1);
    PersistenceManager persist = new PersistenceManager(driver, database, login, password);
    persist.saveObject(foo);
    persist.close();

    persist = new PersistenceManager(driver, database, login, password);

    List<ArrayList<Object>> result = persist.getObjectsMatching(new ArrayList<Object>());
View Full Code Here

  {
    Map<String, Double> map = new HashMap<String, Double>();
    map.put("KEY", 3.0);
    map.put("ANOTHERKEY", 4.0);
    PersistenceManager persist = new PersistenceManager(driver, database, login, password);
    persist.saveObject(map);
    List<Object> all = persist.getObjectsMatching(new Object());
    assertEquals(1, all.size());
    persist.close();
  }
View Full Code Here

  {
    Map<String, Double> map = new HashMap<String, Double>();
    map.put("KEY", 3.0);
    map.put("ANOTHERKEY", 4.0);
    PersistenceManager persist = new PersistenceManager(driver, database, login, password);
    persist.saveObject(map);
    persist.close();

    persist = new PersistenceManager(driver, database, login, password);
    List<HashMap<Object, Object>> results = persist.getObjectsMatching(new HashMap<Object, Object>());
    assertEquals(1, results.size());
View Full Code Here

    list.add("VALUE");
    list.add("ANOTHER VALUE");
    list.add("THIRD VALUE");
    list.add("FOURTH VALUE");
    PersistenceManager persist = new PersistenceManager(driver, database, login, password);
    persist.saveObject(list);
    List<String> anotherList = new ArrayList<String>();
    anotherList.add("ANOTHER VALUE");
    anotherList.add("SECOND VALUE");
    anotherList.add("THIRD VALUE");
    persist.saveObject(anotherList);
View Full Code Here

    persist.saveObject(list);
    List<String> anotherList = new ArrayList<String>();
    anotherList.add("ANOTHER VALUE");
    anotherList.add("SECOND VALUE");
    anotherList.add("THIRD VALUE");
    persist.saveObject(anotherList);
    List<String> yetAnotherList = new ArrayList<String>();
    yetAnotherList.add("VALUE");
    yetAnotherList.add("SOME VALUE");
    persist.saveObject(yetAnotherList);
    persist.close();
View Full Code Here

    anotherList.add("THIRD VALUE");
    persist.saveObject(anotherList);
    List<String> yetAnotherList = new ArrayList<String>();
    yetAnotherList.add("VALUE");
    yetAnotherList.add("SOME VALUE");
    persist.saveObject(yetAnotherList);
    persist.close();

    persist = new PersistenceManager(driver, database, login, password);
    // retrieve objects by a sorted object
    List<Collection> allObjects = persist.getObjects(Collection.class, new All());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.