source: Git/src/main/java/com/wediscussmovies/project/repository/MovieRepository.java@ 3c0f9a9

main
Last change on this file since 3c0f9a9 was 3c0f9a9, checked in by Petar Partaloski <ppartaloski@…>, 2 years ago

Added genre liking, fixed counter, improved paging, improved searches

  • Property mode set to 100644
File size: 661 bytes
RevLine 
[6e7b472]1package com.wediscussmovies.project.repository;
2
[e0ef1b1]3import com.wediscussmovies.project.model.Movie;
4import com.wediscussmovies.project.model.Person;
[6e7b472]5import org.springframework.data.jpa.repository.JpaRepository;
[3c0f9a9]6import org.springframework.data.jpa.repository.Query;
[6e7b472]7import org.springframework.stereotype.Repository;
8
9import java.util.List;
10
11@Repository
12public interface MovieRepository extends JpaRepository<Movie, Integer> {
[e0ef1b1]13 List<Movie> findAllByTitleLike(String Title);
14 List<Movie> findAllByDirector(Person director);
15 List<Movie> findAllByDirectorIsNull();
[3c0f9a9]16 @Query(value="select m.movieId from Movie m")
17 List<Integer> findAllMovieIds();
[6e7b472]18}
Note: See TracBrowser for help on using the repository browser.