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.ProfitRepository; | |
8 | import edu.ucsb.cs156.happiercows.repositories.UserCommonsRepository; | |
9 | import edu.ucsb.cs156.happiercows.repositories.UserRepository; | |
10 | import edu.ucsb.cs156.happiercows.services.jobs.JobContextConsumer; | |
11 | ||
12 | @Service | |
13 | public class MilkTheCowsJobFactory { | |
14 | ||
15 | @Autowired | |
16 | private CommonsRepository commonsRepository; | |
17 | ||
18 | @Autowired | |
19 | private UserCommonsRepository userCommonsRepository; | |
20 | ||
21 | @Autowired | |
22 | private UserRepository userRepository; | |
23 | ||
24 | @Autowired | |
25 | private ProfitRepository profitRepository; | |
26 | ||
27 | public JobContextConsumer create() { | |
28 |
1
1. create : replaced return value with null for edu/ucsb/cs156/happiercows/jobs/MilkTheCowsJobFactory::create → KILLED |
return new MilkTheCowsJob( |
29 | commonsRepository, | |
30 | userCommonsRepository, | |
31 | userRepository, | |
32 | profitRepository); | |
33 | } | |
34 | } | |
Mutations | ||
28 |
1.1 |