Ignore:
Timestamp:
01/16/22 20:22:55 (3 years ago)
Author:
Test <matonikolov77@…>
Branches:
main
Children:
3ded84d
Parents:
2d57cad (diff), 7bc8942 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Resolving models

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

Legend:

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

    r2d57cad r7fafead  
    55import org.springframework.stereotype.Repository;
    66
     7import java.util.List;
     8
    79@Repository
    810public interface DiscussionRepository extends JpaRepository<Discussion, Integer> {
     11    public List<Discussion> findAllByTitleLike(String title);
    912}
  • src/main/java/com/wediscussmovies/project/repository/GenreRepository.java

    r2d57cad r7fafead  
    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(String genre_type);
    912}
  • src/main/java/com/wediscussmovies/project/repository/PersonRepository.java

    r2d57cad r7fafead  
    22
    33import com.wediscussmovies.project.model.Person;
     4import com.wediscussmovies.project.model.enumerations.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 List<Person> findAllByPersonTypeAndNameLike(PersonType type, String name);
     16    public List<Person> findAllByPersonTypeAndSurnameLike(PersonType type, String surname);
     17    public Optional<Person> findPersonByPerson_idAndPersonType(Integer id, PersonType type);
    918}
  • src/main/java/com/wediscussmovies/project/repository/UserRepository.java

    r2d57cad r7fafead  
    55import org.springframework.stereotype.Repository;
    66
     7import java.util.EnumMap;
     8import java.util.Optional;
     9
    710@Repository
    811public interface UserRepository extends JpaRepository<User, Integer> {
     12    public Optional<User> findByEmailAndPassword(String email, String password);
     13    public Optional<User> findByUsernameAndPassword(String email, String password);
     14    public Optional<User> findByUsername(String username);
     15    public Optional<User> findByEmail(String email);
    916}
Note: See TracChangeset for help on using the changeset viewer.