Package de.danet.an.util.persistentmaps

Examples of de.danet.an.util.persistentmaps.JDBCPersistentMap.store()


  JDBCPersistentMap map
      = new JDBCPersistentMap(null, "Danet","DefaultPersistenceMap");
  map.setConnection(con);
  map.put("nullString", null);
  map.put("emptyString", "");
  map.store();
  map.load();
  assertTrue (map.get ("nullString") == null);
  assertTrue (map.get("emptyString").equals (""));
    }
}
View Full Code Here


  testMap.put("HSc", "Holger Schl�ter");
  assertTrue(testMap.isModified());
  testMap.put("MSc", "Matthias Schirm");
  testMap.setConnection(con);
  assertTrue(testMap.isModified());
  testMap.store();
  assertTrue(!testMap.isModified());
  testMap.setMapId("Dnaet");
  assertTrue(!testMap.isModified());
  testMap.load();
  assertTrue(!testMap.isModified());
View Full Code Here

  assertTrue(testMap.size() == 0);
  testMap.setMapId("Danet");
  testMap.load();
  assertTrue(testMap.size() == 2);
  testMap.clear();
  testMap.store();
    }

    /**
     * Test storing an reloading of a map.  If (exactly) one
     * connection supports batch commands, test for both connections.
View Full Code Here

      storeMap.put(null, null);
  } catch (IllegalArgumentException exc) {
      exceptionCaught = true;
  }
  assertTrue(exceptionCaught);
  storeMap.store();
  storeMap.store();
  JDBCPersistentMap loadMap = new JDBCPersistentMap(null, "Danet");
  loadMap.setConnection(useCon);
  loadMap.load();
  // Verfiy that maps do match
View Full Code Here

  } catch (IllegalArgumentException exc) {
      exceptionCaught = true;
  }
  assertTrue(exceptionCaught);
  storeMap.store();
  storeMap.store();
  JDBCPersistentMap loadMap = new JDBCPersistentMap(null, "Danet");
  loadMap.setConnection(useCon);
  loadMap.load();
  // Verfiy that maps do match
  assertTrue(loadMap.size() == 7);
View Full Code Here

  storeMap.remove("HDO");
  storeMap.put("LONG", "Gunnar von der Beck");
  storeMap.remove("INT");
  storeMap.remove("INT");
  storeMap.remove("ROt");
  storeMap.store();
  storeMap.store();
  JDBCPersistentMap loadMap = new JDBCPersistentMap(null, "Danet");
  loadMap.setConnection(useCon);
  loadMap.load();
  // Verfiy that maps do match
View Full Code Here

  storeMap.put("LONG", "Gunnar von der Beck");
  storeMap.remove("INT");
  storeMap.remove("INT");
  storeMap.remove("ROt");
  storeMap.store();
  storeMap.store();
  JDBCPersistentMap loadMap = new JDBCPersistentMap(null, "Danet");
  loadMap.setConnection(useCon);
  loadMap.load();
  // Verfiy that maps do match
  assertTrue(loadMap.size() == 7);
View Full Code Here

  map.setInsertStatement("ILLEGAL STATEMENT");
  String newStatement = map.getInsertStatement();
  assertTrue(newStatement.equals("ILLEGAL STATEMENT"));
  // Verify that nothing is done (optimizing)
  map.put("HSc", "Holger Schlueter"); // Already existing -> modify
  map.store();
  // Verfiy that new statement ist used
  map.put("HDO", "Dr. O.");
  boolean exceptionCaught = false;
  try {
      map.store();
View Full Code Here

  map.store();
  // Verfiy that new statement ist used
  map.put("HDO", "Dr. O.");
  boolean exceptionCaught = false;
  try {
      map.store();
  } catch( IOException exc ) {
      exceptionCaught = true;
  }
  assertTrue(exceptionCaught);
  map.setInsertStatement(oldStatement);
View Full Code Here

  } catch( IOException exc ) {
      exceptionCaught = true;
  }
  assertTrue(exceptionCaught);
  map.setInsertStatement(oldStatement);
  map.store();
    }

    /**
     * Test setting the updateStatement
     * @exception Exception if an error occurs
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.