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;
 }
 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;
 }