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

Location:
src/main/java/com/wediscussmovies/project/repository
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/wediscussmovies/project/repository/GenreRepository.java

    r839f96a r7a0bf79  
    55import org.springframework.stereotype.Repository;
    66
     7import java.util.List;
     8
    79@Repository
    810public interface GenreRepository extends JpaRepository<Genre, Integer> {
     11    public List<Genre> findAllByGenre_typeLike(String genre_type);
    912}
  • src/main/java/com/wediscussmovies/project/repository/PersonRepository.java

    r839f96a r7a0bf79  
    22
    33import com.wediscussmovies.project.model.Person;
     4import com.wediscussmovies.project.model.PersonType;
    45import org.springframework.data.jpa.repository.JpaRepository;
     6import org.springframework.data.jpa.repository.Query;
    57import org.springframework.stereotype.Repository;
     8
     9import java.util.List;
     10import java.util.Optional;
    611
    712@Repository
    813public interface PersonRepository extends JpaRepository<Person, Integer> {
     14    public List<Person> findAllByPersonType(PersonType type);
     15    public Optional<Person> findPersonByPerson_idAndPersonType(Integer id, PersonType type);
    916}
Note: See TracChangeset for help on using the changeset viewer.