Esempio n. 1
0
 @Override
 public Set<Integer> getCarIds(String company, String type) {
   Set<Integer> out = new HashSet<Integer>();
   try {
     for (Car c : em.find(CarRentalCompany.class, company).getCars(type)) {
       out.add(c.getId());
     }
   } catch (IllegalArgumentException ex) {
     Logger.getLogger(ManagerSession.class.getName()).log(Level.SEVERE, null, ex);
     return null;
   }
   return out;
 }