SHARE
TWEET

Untitled

a guest Oct 12th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (!prospectionRepository.findAll().isEmpty()) {
  2.         List<Prospection> all = prospectionRepository.findAll();
  3.         for (int i = 0; i < all.size()-1; i++) {
  4.             for (int k = i+1;k < all.size(); k++) {
  5.                 if (all.get(i).getProspectNumber() == all.get(k).getProspectNumber()) {
  6.                     all.remove(all.get(i));
  7.                 }
  8.             }
  9.         }
  10.         prospectionRepository.save(all);
RAW Paste Data
Top