public static List<Flight> getDepArrivalFlights(String DepArrKey)
			throws NewCustomException {

		List<Flight> SearchedFlights = null;
		Location arrLoc = getLocation(DepArrKey.substring(0, 3));
		Location depLoc = getLocation(DepArrKey.substring(3));

		if ((arrLoc != null) && (depLoc != null)) {
			SearchedFlights = new ArrayList<Flight>();
			Transaction tx = null;
			Session session = null;
			try {
				session = HibernateUtil.getSessionFactory().openSession();
				tx = session.beginTransaction();

				Criteria criteria = session.createCriteria(Flight.class);
				criteria.add(Restrictions.eq("depLoc", depLoc));
				criteria.add(Restrictions.eq("arrLoc", arrLoc));
				SearchedFlights = criteria.list();

			} catch (HibernateException exception) {
				if (tx != null)
					tx.rollback();
				throw new NewCustomException("Error in Finding Location");

			} finally {
				session.close();
			}
		}
		return SearchedFlights;
	}