Changeset 5444409 for src/main/java/com/example/moviezone/service
- Timestamp:
- 02/09/23 16:05:47 (21 months ago)
- Branches:
- master
- Children:
- 01a1ca6
- Parents:
- 17a2fda
- Location:
- src/main/java/com/example/moviezone/service
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/moviezone/service/CinemaService.java
r17a2fda r5444409 7 7 public interface CinemaService { 8 8 List<Cinema> findAllCinemas(); 9 Cinema findCinemaById(Integer id_cinema); 9 10 } -
src/main/java/com/example/moviezone/service/Impl/CinemaServiceImpl.java
r17a2fda r5444409 20 20 return cinemaRepository.findAll(); 21 21 } 22 23 @Override 24 public Cinema findCinemaById(Integer id_cinema) { 25 return cinemaRepository.findById(id_cinema).orElseThrow(RuntimeException::new); 26 } 22 27 } -
src/main/java/com/example/moviezone/service/Impl/UserServiceImpl.java
r17a2fda r5444409 1 1 package com.example.moviezone.service.Impl; 2 2 3 import com.example.moviezone.model.Customer; 4 import com.example.moviezone.model.Role; 5 import com.example.moviezone.model.User; 6 import com.example.moviezone.model.Worker; 3 import com.example.moviezone.model.*; 7 4 import com.example.moviezone.model.exceptions.InvalidUsernameOrPasswordException; 8 5 import com.example.moviezone.model.exceptions.PasswordsDoNotMatchException; … … 75 72 } 76 73 74 @Override 75 public void registerWorker(String first_name, String last_name, String username, String email, String number, String password, String position, String work_hours_from, String work_hours_to, Cinema cinema) { 76 userRepository.save(new Worker(password,first_name,last_name,email,number,username,position,work_hours_from,work_hours_to,cinema)); 77 78 } 79 77 80 78 81 } -
src/main/java/com/example/moviezone/service/UserService.java
r17a2fda r5444409 1 1 package com.example.moviezone.service; 2 2 3 import com.example.moviezone.model.Cinema; 3 4 import com.example.moviezone.model.Role; 4 5 import com.example.moviezone.model.User; … … 13 14 void register(String first_name, String last_name,String username, String email, String number, String password, Role role); 14 15 User login(String username,String password); 16 void registerWorker(String first_name, String last_name, String username, String email, String number, String password, String position, String work_hours_from, String work_hours_to, Cinema cinema); 15 17 }
Note:
See TracChangeset
for help on using the changeset viewer.