1 package org.wcb.model.manager.impl;
2
3 import org.wcb.model.dao.IApplicantDAO;
4 import org.wcb.model.vo.hibernate.FAA8710ApplicationBO;
5 import org.wcb.model.manager.IApplicantManager;
6 import org.wcb.exception.ManagerException;
7 import org.wcb.exception.InfrastructureException;
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 public class ApplicantManager extends BaseManager implements IApplicantManager {
29
30 private IApplicantDAO iDAO;
31
32 public IApplicantDAO getDao() {
33 return iDAO;
34 }
35
36 public void setDao(IApplicantDAO dao) {
37 this.iDAO = dao;
38 }
39
40
41
42
43
44
45
46 public FAA8710ApplicationBO findEntry(Integer i) throws ManagerException {
47 FAA8710ApplicationBO returnValue;
48 try
49 {
50 returnValue = iDAO.findEntry(i);
51 if (returnValue == null)
52 {
53 throw new ManagerException("Failed to find applicant entry: " + i.intValue());
54 }
55 }
56 catch (InfrastructureException ie)
57 {
58 throw new ManagerException("Failed to find applicant entry due to InfrastructureException " + i.intValue(), ie);
59 }
60 return returnValue;
61 }
62
63
64
65
66
67
68 public void saveApplicant(FAA8710ApplicationBO entry) throws ManagerException {
69 try
70 {
71 iDAO.saveOrUpdateObject(entry);
72 }
73 catch (Exception ie) {
74 throw new ManagerException("Failed to save applicant entry due to InfrastructureException ", ie);
75 }
76 }
77
78 }