Package de.danet.an.util.persistentmaps

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


  String newStatement = map.getUpdateStatement();
  assertTrue(newStatement.equals
       ("ILLEGAL STATEMENT WHERE MAPID = ? AND ITEM = ?"));
  // Verify that nothing is done (optimizing)
  map.put("HsC", "Holger Schlueter"); // New key -> insert
  map.store();
  // Verfiy that new statement ist used
  map.put("HSc", "Holger Schl�ter");
  boolean exceptionCaught = false;
  try {
      map.store();
View Full Code Here


  map.store();
  // Verfiy that new statement ist used
  map.put("HSc", "Holger Schl�ter");
  boolean exceptionCaught = false;
  try {
      map.store();
  } catch( IOException exc ) {
      exceptionCaught = true;
  }
  assertTrue(exceptionCaught);
  map.setUpdateStatement(oldStatement);
View Full Code Here

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

    /**
     * Test setting the deleteStatement
     * @exception Exception if an error occurs
View Full Code Here

  map.setDeleteStatement("ILLEGAL STATEMENT");
  String newStatement = map.getDeleteStatement();
  assertTrue(newStatement.equals("ILLEGAL STATEMENT"));
  // Verify that nothing is done (optimizing)
  map.remove("HSC"); // Not existing
  map.store();
  // Verfiy that new statement ist used
  map.remove("ALM");
  boolean exceptionCaught = false;
  try {
      map.store();
View Full Code Here

  map.store();
  // Verfiy that new statement ist used
  map.remove("ALM");
  boolean exceptionCaught = false;
  try {
      map.store();
  } catch( IOException exc ) {
      exceptionCaught = true;
  }
  assertTrue(exceptionCaught);
  map.setDeleteStatement(oldStatement);
View Full Code Here

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

    /**
     * Copying a map
     * @exception Exception if an error occurs
View Full Code Here

  JDBCPersistentMap map2 = new JDBCPersistentMap(null, "Danet2");
  map2.setConnection(con);
  assertTrue(map2.size() == 0);
  map2.putAll(map1);
  assertTrue(map2.size() == 8);
  map2.store();
  JDBCPersistentMap map3= new JDBCPersistentMap(null, "Danet2");
  map3.setConnection(con);
  assertTrue(map3.size() == 0);
  map3.load();
  assertTrue(map3.size() == 8);
View Full Code Here

     */
    public void cleanTable() throws Exception {
  JDBCPersistentMap map
      = new JDBCPersistentMap(null, "Danet","DefaultPersistenceMap");
  map.setConnection(con);
  map.store(); // Clear DB table
  map.put("HSc", "Holger Schl�ter");
  map.put("MSc", "Matthias Schirm");
  map.put("ML", "Dr. Michael Lipp");
  map.put("GB", "Gunnar von de Beck");
  map.put("INT", new Integer(1307));
View Full Code Here

  map.put("MSc", "Matthias Schirm");
  map.put("ML", "Dr. Michael Lipp");
  map.put("GB", "Gunnar von de Beck");
  map.put("INT", new Integer(1307));
  map.put("NULL", null);
  map.store();
  map.load();
  assertTrue(map.size() == 6);
  map.clear(); // Clear the map
  assertTrue(map.size() == 0)
  map.store();
View Full Code Here

  map.store();
  map.load();
  assertTrue(map.size() == 6);
  map.clear(); // Clear the map
  assertTrue(map.size() == 0)
  map.store();
  map.load();
  assertTrue(map.size() == 0)
    }

    /**
 
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.