  public static int save (String tableName, Map < String, Object > hashmap)
    {
      Connection connection = null;
      Statement stmt = null;
      ResultSet rs = null;
      String columns = "";
      String values = "";
      int id = 0;
      try
      {
        connection = Connector.getConnection();
        Map<String, String> SQLHashmap = convertJavaToSQL(hashmap);
        DatabaseMetaData md = connection.getMetaData();
        if (md.getColumns(null, null, tableName, "creation_date").next())
        {
          SQLHashmap.put("creation_date", "NOW()");
          SQLHashmap.put("last_modified_date", "NOW()");
        }
        for (String key : SQLHashmap.keySet())
        {
          columns += key + ",";
          values += SQLHashmap.get(key) + ",";
        }
        columns = columns.replaceAll(",$", "");
        values = values.replaceAll(",$", "");
        stmt = connection.createStatement();
        if (!hashmap.containsKey("id"))
        {
          stmt.executeUpdate("INSERT INTO " + tableName + " (" + columns + ") VALUES (" + values + ")",
              Statement.RETURN_GENERATED_KEYS);
          rs = stmt.getGeneratedKeys();
          if (rs.next())
          {
            id = rs.getInt(1);
          }
        }
        else 
        {
          id = stmt.executeUpdate("INSERT INTO " + tableName + " (" + columns + ") VALUES (" + values + ")") != 0 ? (int) hashmap
              .get("id") : 0;
        }
      }
      catch (SQLException e)
      {
        e.printStackTrace();
      }
      StringBuffer sb = new StringBuffer();
      Map<String, Object> row = Manager.find(id, tableName);
      for (String key : row.keySet())
        sb.append(row.get(key).hashCode());
      String sha256 = DigestHash.getShaHash(sb.toString());
      return id;
    }

  public static int save (String tableName, Map < String, Object > hashmap)
    {
      Connection connection = null;
      Statement stmt = null;
      ResultSet rs = null;
      String columns = "";
      String values = "";
      int id = 0;
      try
      {
        connection = Connector.getConnection();
        Map<String, String> SQLHashmap = convertJavaToSQL(hashmap);
        DatabaseMetaData md = connection.getMetaData();
        if (md.getColumns(null, null, tableName, "creation_date").next())
        {
          SQLHashmap.put("creation_date", "NOW()");
          SQLHashmap.put("last_modified_date", "NOW()");
        }
        for (String key : SQLHashmap.keySet())
        {
          columns += key + ",";
          values += SQLHashmap.get(key) + ",";
        }
        columns = columns.replaceAll(",$", "");
        values = values.replaceAll(",$", "");
        stmt = connection.createStatement();
        if (!hashmap.containsKey("id"))
        {
          stmt.executeUpdate("INSERT INTO " + tableName + " (" + columns + ") VALUES (" + values + ")",
              Statement.RETURN_GENERATED_KEYS);
          rs = stmt.getGeneratedKeys();
          if (rs.next())
          {
            id = rs.getInt(1);
          }
        }
        else 
        {
          id = stmt.executeUpdate("INSERT INTO " + tableName + " (" + columns + ") VALUES (" + values + ")") != 0 ? (int) hashmap
              .get("id") : 0;
        }
      }
      catch (SQLException e)
      {
        e.printStackTrace();
      }
      StringBuffer sb = new StringBuffer();
      Map<String, Object> row = Manager.find(id, tableName);
      System.out.println("aoidjaoidjsoaisj"+row);
      for (String key : row.keySet()){
         String value = row.get(key) == null ? "" : row.get(key).toString();
         sb.append(value.hashCode());
      }
      String sha256 = DigestHash.getShaHash(sb.toString());
      return id;
    }
