Ignore:
Timestamp:
01/09/21 03:04:38 (4 years ago)
Author:
Vzdra <vladko.zdravkovski@…>
Branches:
master
Children:
a3d2b0d
Parents:
297bd16
Message:

added full text search on work

Location:
src/main/java/it/finki/tinki/repository
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/it/finki/tinki/repository/InternshipRepository.java

    r297bd16 rf067338  
    11package it.finki.tinki.repository;
    22
     3import it.finki.tinki.model.Skill;
    34import it.finki.tinki.model.Work.Internship;
     5import it.finki.tinki.model.Work.Job;
    46import org.springframework.data.jpa.repository.JpaRepository;
    57import org.springframework.stereotype.Repository;
     
    1012public interface InternshipRepository extends JpaRepository<Internship, Long> {
    1113    List<Internship> findAllByAccount_Id(Long accountId);
     14    List<Internship> findAllByTitleContainsOrDescriptionContains(String title, String description);
     15    List<Internship> findAllBySkillsTrainedContaining(Skill skill);
    1216}
  • src/main/java/it/finki/tinki/repository/JobRepository.java

    r297bd16 rf067338  
    11package it.finki.tinki.repository;
    22
     3import it.finki.tinki.model.Skill;
    34import it.finki.tinki.model.Work.Job;
    45import org.springframework.data.jpa.repository.JpaRepository;
     
    67
    78import java.util.List;
     9import java.util.Set;
    810
    911@Repository
    1012public interface JobRepository extends JpaRepository<Job, Long>{
    1113    List<Job> findAllByAccount_Id(Long accountId);
     14    List<Job> findAllByTitleContainsOrDescriptionContains(String title, String description);
     15    List<Job> findAllBySkillsRequiredContaining(Skill skill);
    1216}
  • src/main/java/it/finki/tinki/repository/ProjectRepository.java

    r297bd16 rf067338  
    11package it.finki.tinki.repository;
    22
     3import it.finki.tinki.model.Skill;
     4import it.finki.tinki.model.Work.Job;
    35import it.finki.tinki.model.Work.Project;
    46import org.springframework.data.jpa.repository.JpaRepository;
     
    1012public interface ProjectRepository extends JpaRepository<Project, Long> {
    1113    List<Project> findAllByAccount_Id(Long accountId);
     14    List<Project> findAllByTitleContainsOrDescriptionContains(String title, String description);
     15    List<Project> findAllBySkillsRequiredContaining(Skill skill);
    1216}
  • src/main/java/it/finki/tinki/repository/SkillRepository.java

    r297bd16 rf067338  
    55import org.springframework.stereotype.Repository;
    66
     7import java.util.List;
    78import java.util.Optional;
    89
     
    1011public interface SkillRepository extends JpaRepository<Skill, Long> {
    1112    Optional<Skill> findById(Long id);
     13    List<Skill> findAllByNameContaining(String text);
    1214}
Note: See TracChangeset for help on using the changeset viewer.