1 package net.swindle.springdemo.domain;
2
3 import net.swindle.springdemo.service.RecruitmentService;
4
5
6
7
8
9
10 public class HumanResourceDept implements Department {
11
12 private String deptName;
13 private final RecruitmentService recruitmentService;
14 private final Organization organization;
15
16
17
18
19
20 public HumanResourceDept(RecruitmentService recruitmentService, Organization organization) {
21 this.recruitmentService = recruitmentService;
22 this.organization = organization;
23 }
24
25
26 public void setDeptName(String deptName) {
27 this.deptName = deptName;
28 }
29
30
31
32
33 @Override
34 public String hiringStatus(int numberOfRecruitments) {
35 return recruitmentService.recruitEmployees(
36 organization.getCompanyName(), deptName, numberOfRecruitments);
37 }
38 }