Changeset a3d2b0d for src/main/java/it/finki/tinki/service/impl
- Timestamp:
- 01/09/21 03:40:07 (4 years ago)
- Branches:
- master
- Children:
- 17abe5e
- Parents:
- f067338
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/service/impl/WorkServiceImpl.java
rf067338 ra3d2b0d 68 68 69 69 @Override 70 public List<Job> getAllJobs() {71 return this.jobRepository.findAll();72 }73 74 @Override75 public List<Internship> getAllInternships() {76 return this.internshipRepository.findAll();77 }78 79 @Override80 public List<Project> getAllProjects() {81 return this.projectRepository.findAll();82 }83 84 @Override85 70 public Job insertJob(String title, String description, Long adccId, int salary, List<Long> skillsRequired, AccountType type) { 86 71 List<Skill> skills = this.skillService.returnSkillsBasedOnId(skillsRequired); … … 131 116 132 117 @Override 118 public Job editJob(Long id, String title, String description, int salary) { 119 Job j = this.jobRepository.findById(id).get(); 120 121 j.setTitle(title); 122 j.setDescription(description); 123 j.setSalary(salary); 124 125 return this.jobRepository.save(j); 126 } 127 128 @Override 129 public Internship editInternship(Long id, String title, String description, int salary, int openSpots) { 130 Internship j = this.internshipRepository.findById(id).get(); 131 132 j.setTitle(title); 133 j.setDescription(description); 134 j.setSalary(salary); 135 136 return this.internshipRepository.save(j); 137 } 138 139 @Override 140 public Project editProject(Long id, String title, String description, int salary) { 141 Project j = this.projectRepository.findById(id).get(); 142 143 j.setTitle(title); 144 j.setDescription(description); 145 j.setSalary(salary); 146 147 return this.projectRepository.save(j); 148 } 149 150 @Override 133 151 public List<JobResponseDTO> fullTextJobSearch(String text) { 134 152 List<Skill> skills = this.skillService.returnBasedOnText(text); … … 207 225 return jobs2; 208 226 } 227 228 @Override 229 public Job getJobById(Long id) { 230 return this.jobRepository.findById(id).get(); 231 } 232 233 @Override 234 public Internship getInternshipById(Long id) { 235 return this.internshipRepository.findById(id).get(); 236 } 237 238 @Override 239 public Project getProjectById(Long id) { 240 return this.projectRepository.findById(id).get(); 241 } 209 242 }
Note:
See TracChangeset
for help on using the changeset viewer.