1 | package edu.ucsb.cs156.happiercows.jobs; | |
2 | ||
3 | import org.springframework.beans.factory.annotation.Autowired; | |
4 | import org.springframework.stereotype.Service; | |
5 | ||
6 | import edu.ucsb.cs156.happiercows.repositories.CommonsRepository; | |
7 | import edu.ucsb.cs156.happiercows.repositories.CommonStatsRepository; | |
8 | import edu.ucsb.cs156.happiercows.repositories.UserCommonsRepository; | |
9 | import edu.ucsb.cs156.happiercows.services.AverageCowHealthService; | |
10 | import edu.ucsb.cs156.happiercows.services.jobs.JobContextConsumer; | |
11 | ||
12 | @Service | |
13 | public class CommonStatsJobFactory { | |
14 | ||
15 | private final AverageCowHealthService averageCowHealthService; | |
16 | private final CommonStatsRepository commonStatsRepository; | |
17 | private final UserCommonsRepository userCommonsRepository; | |
18 | private final CommonsRepository commonsRepository; | |
19 | ||
20 | @Autowired | |
21 | public CommonStatsJobFactory( | |
22 | AverageCowHealthService averageCowHealthService, | |
23 | CommonStatsRepository commonStatsRepository, | |
24 | UserCommonsRepository userCommonsRepository, | |
25 | CommonsRepository commonsRepository) { | |
26 | this.averageCowHealthService = averageCowHealthService; | |
27 | this.commonStatsRepository = commonStatsRepository; | |
28 | this.userCommonsRepository = userCommonsRepository; | |
29 | this.commonsRepository = commonsRepository; | |
30 | } | |
31 | ||
32 | public JobContextConsumer create() { | |
33 |
1
1. create : replaced return value with null for edu/ucsb/cs156/happiercows/jobs/CommonStatsJobFactory::create → KILLED |
return new CommonStatsJob(averageCowHealthService, commonStatsRepository, userCommonsRepository, commonsRepository); |
34 | } | |
35 | } | |
Mutations | ||
33 |
1.1 |