1 package org.wcb.model.dao.impl;
2
3 import org.wcb.model.dao.IAirportDAO;
4 import org.wcb.model.vo.hibernate.AirportBO;
5 import org.wcb.exception.DAOException;
6 import org.wcb.exception.InfrastructureException;
7
8 import java.util.List;
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 public class AirportDAO extends AbstractHibernateDAO implements IAirportDAO {
31
32 public AirportBO findAirportFAA(String faacode) throws InfrastructureException {
33 try {
34 return (AirportBO) getObjectsBy(AirportBO.class, "faa", faacode).get(0);
35 } catch (DAOException daoe) {
36 throw new InfrastructureException(daoe);
37 }
38 }
39
40 public List<AirportBO> findAll() throws InfrastructureException {
41 try {
42 return super.getObjects(AirportBO.class);
43 } catch (DAOException daoe) {
44 throw new InfrastructureException(daoe);
45 }
46 }
47
48 public void deleteAirport(AirportBO oAirport) throws InfrastructureException {
49 getHibernateTemplate().delete(oAirport);
50 }
51 }