Guest User

Untitled

a guest
Dec 13th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. public void actualizarOtros(String gestor, String basedatos, Connection gcn) throws Exception {
  2. long startTime = System.currentTimeMillis();
  3.  
  4. List<OtrosObjetos> lista = retornaOtrosObjetos(gestor, basedatos, gcn);
  5.  
  6. List<OtrosObjetos> lstUpd = fileDatos.getOtros();
  7. long endTime = System.currentTimeMillis() - startTime;
  8.  
  9. System.out.println("Actualizar Otros 1:" + endTime);
  10.  
  11. long startTime2 = System.currentTimeMillis();
  12. System.out.println("Tamaño de datos:" + lstUpd.size());
  13.  
  14. //Thread hilo = new Thread();
  15. //hilo.start();
  16. lstUpd.stream().forEach(oo -> {
  17.  
  18. OtrosObjetos busca;
  19. busca = lista.stream().filter(_oo -> _oo.getNombre().trim().equalsIgnoreCase(oo.getNombre().trim())).findFirst().orElse(null);
  20.  
  21. if (busca != null) {
  22. String result = ejecutarSQL(gcn, busca.codigoDrop());
  23. if (!result.isEmpty()) {
  24. txtlog.append(result);
  25. }
  26. }
  27.  
  28. String codigo = oo.getCodigo();
  29.  
  30. if (oo.getTipo().equalsIgnoreCase("PROCEDIMIENTO")) {
  31. codigo = toEncript(oo.getCodigo());
  32. }
  33.  
  34. String result = ejecutarSQL(gcn, codigo);
  35. if (!result.isEmpty()) {
  36. txtlog.append(result);
  37. }
  38. });
  39. long endTime2 = System.currentTimeMillis() - startTime2;
  40. System.out.println("Actualizar Otros 2:" + endTime2);
Add Comment
Please, Sign In to add comment