Package de.danet.an.util.persistentmaps

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


  ByteArrayOutputStream bo = new ByteArrayOutputStream();
  ObjectOutputStream o = new ObjectOutputStream(bo);
  o.writeObject(map);
  o.close();
  map.remove("HSc");
  map.store();
  map.load();
  assertTrue(map.size() == 2); // Two entries stored in DB 
  ByteArrayInputStream bi = new ByteArrayInputStream(bo.toByteArray());
  ObjectInputStream i = new ObjectInputStream(bi);
  map = (JDBCPersistentMap)i.readObject(); // Three object read
View Full Code Here


  ObjectInputStream i = new ObjectInputStream(bi);
  map = (JDBCPersistentMap)i.readObject(); // Three object read
  assertTrue(map.size() == 3)
  i.close();
  map.setConnection(con);
  map.store(); // Three objects stored
  map.clear();
  assertTrue(map.size() == 0)
  map.load(); // All three objects read
  assertTrue(map.size() == 3)
    }
View Full Code Here

  JDBCPersistentMap testMap = new JDBCPersistentMap(null, "Danet");
  testMap.setConnection(con);
  testMap.put("HSc", "Holger Schl�ter");
  testMap.put("MSc", "Matthias Schirm");
  testMap.setConnection(con);
  testMap.store();
  testMap.setConnection(con);
  testMap.store();
  if (secondCon != null) {
      testMap.clear();
      testMap.setConnection(secondCon);
View Full Code Here

  testMap.put("HSc", "Holger Schl�ter");
  testMap.put("MSc", "Matthias Schirm");
  testMap.setConnection(con);
  testMap.store();
  testMap.setConnection(con);
  testMap.store();
  if (secondCon != null) {
      testMap.clear();
      testMap.setConnection(secondCon);
      assertTrue(testMap.maxKeyLength() == 50);
      testMap.put("ALM", "Alex M�ller");
View Full Code Here

  if (secondCon != null) {
      testMap.clear();
      testMap.setConnection(secondCon);
      assertTrue(testMap.maxKeyLength() == 50);
      testMap.put("ALM", "Alex M�ller");
      testMap.store();
      testMap.clear();
      assertTrue(testMap.size() == 0);
      testMap.load();
      assertTrue(testMap.size() == 1);
  }
View Full Code Here

  assertTrue(testMap.maxKeyLength() == 50);
  testMap.load();
  assertTrue(testMap.size() == 2);
  if (secondCon != null) {
      testMap.setConnection(secondCon);
      testMap.store();
      testMap.load();
      assertTrue(testMap.size() == 2);
  }
  testMap.setConnection(con);
  if (secondCon != null) {
View Full Code Here

      testMap.remove("MSc"); // Delete
      testMap.put("GB", "Gunnar von der Beck"); // Insert
      testMap.put("ALM", "Alex M�ller");
      assertTrue(testMap.size() == 3);
      testMap.setConnection(secondCon);
      testMap.store();
      testMap.load();
      assertTrue(testMap.size() == 3);
  }
  testMap.setConnection(con);
  testMap.clear();
View Full Code Here

      testMap.load();
      assertTrue(testMap.size() == 3);
  }
  testMap.setConnection(con);
  testMap.clear();
  testMap.store();
  if (secondCon != null) {
      testMap.setConnection(secondCon);
      testMap.clear();
      testMap.store();
  }
View Full Code Here

  testMap.clear();
  testMap.store();
  if (secondCon != null) {
      testMap.setConnection(secondCon);
      testMap.clear();
      testMap.store();
  }
    }

    /**
     * Test setting of maximum svalue
View Full Code Here

    m.setConnection(con);
    m.setMapId (key);
    m.setNewMap ();
    m.putAll(oldData);
    try {
        m.store();
    } catch (PersistentMapSQLException e) {
        throw (SQLException)e.getCause();
    }
    m.setConnection(null);
      }
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.