Пример #1
0
 public List<Flight> getFlights(Flight flight) throws Exception {
   List<Flight> flightList;
   if (objCont != null) {
     objCont = getObjCont();
   }
   try {
     flightList = objCont.queryByExample(flight);
     objCont.commit();
   } catch (Exception e) {
     throw e;
   }
   return flightList;
 }
Пример #2
0
 public List<Pilot> getPilots(Pilot pilot) throws Exception {
   List<Pilot> pilotList;
   if (objCont != null) {
     objCont = getObjCont();
   }
   try {
     pilotList = objCont.queryByExample(pilot);
     objCont.commit();
   } catch (Exception e) {
     throw e;
   }
   return pilotList;
 }