Ignore:
Timestamp:
01/16/22 03:40:31 (3 years ago)
Author:
Petar Partaloski <ppartaloski@…>
Branches:
main
Children:
2a5d6a3
Parents:
839f96a
Message:

Early implementations, MovieController CRUD implementation included

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/wediscussmovies/project/service/impl/MovieServiceImpl.java

    r839f96a r7a0bf79  
    77
    88import java.util.List;
     9import java.util.Optional;
    910
    1011@Service
     
    2223
    2324    @Override
     25    public Optional<Movie> findById(Integer id) {
     26        return movieRepository.findById(id);
     27    }
     28
     29    @Override
     30    public Movie save(Movie movie) {
     31        return movieRepository.save(movie);
     32    }
     33
     34    @Override
     35    public void deleteById(int id) {
     36        movieRepository.deleteById(id);
     37    }
     38
     39    @Override
    2440    public List<Movie> searchByTitle(String title) {
    2541        return movieRepository.findAllByTitleLike("%"+title+"%");
    2642    }
    2743}
     44
     45
Note: See TracChangeset for help on using the changeset viewer.