Ejemplo n.º 1
0
 @Override
 public List<BusInfo> getAll() {
   List<BusInfo> list;
   if ((list = busInfoRepo.findAll()).isEmpty()) {
     LOGGER.warn("Cant find any Bus in class: " + getClass().getName());
   }
   return list;
 }
Ejemplo n.º 2
0
 @Override
 public Map<Integer, String> getAllBusNumber() {
   Map<Integer, String> list = new HashMap<>();
   for (String s : busInfoRepo.getAllBusNumber()) {
     list.put(list.size() + 1, s);
   }
   return list;
 }
Ejemplo n.º 3
0
 @Override
 public BusInfo getByDriverPhone(String phone) {
   BusInfo busInfo;
   if ((busInfo = busInfoRepo.getBusByDriverPhone(phone)) == null) {
     LOGGER.warn(
         "Not find any Bus for driver phone:" + phone + ". In class: " + getClass().getName());
     busInfo = new BusInfo();
   }
   return busInfo;
 }