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.entities.jobs.Job; | |
7 | import edu.ucsb.cs156.happiercows.repositories.CommonsRepository; | |
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 | import lombok.extern.slf4j.Slf4j; | |
12 | ||
13 | @Service | |
14 | @Slf4j | |
15 | public class SetCowHealthJobFactory { | |
16 | ||
17 | @Autowired | |
18 | private CommonsRepository commonsRepository; | |
19 | | |
20 | @Autowired | |
21 | private UserCommonsRepository userCommonsRepository; | |
22 | ||
23 | @Autowired | |
24 | private UserRepository userRepository; | |
25 | ||
26 | public JobContextConsumer create(Long commonsID, double health) { | |
27 | log.info("commonsRepository = " + commonsRepository); | |
28 | log.info("userCommonsRepository = " + userCommonsRepository); | |
29 |
1
1. create : replaced return value with null for edu/ucsb/cs156/happiercows/jobs/SetCowHealthJobFactory::create → KILLED |
return new SetCowHealthJob(commonsID, health, commonsRepository, userCommonsRepository, userRepository); |
30 | } | |
31 | } | |
Mutations | ||
29 |
1.1 |