示例#1
0
 private static void editar() {
   User user = userRn.buscarPorId(1L);
   user.setNome(user.getNome().concat(" A."));
   try {
     userRn.salvar(user);
     System.out.println("Salvo");
   } catch (Exception e) {
     System.out.println("Erro ao salvar: " + e.getMessage());
     e.printStackTrace();
   }
 }
示例#2
0
 private static void buscarPorId() {
   mostrar(userRn.buscarPorId(2L));
 }