-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repository creation for each class developed
- Loading branch information
1 parent
1de401c
commit f243320
Showing
5 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/main/java/cat/udl/eps/softarch/tfgfinder/repository/AdminRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cat.udl.eps.softarch.tfgfinder.repository; | ||
|
||
import cat.udl.eps.softarch.tfgfinder.domain.Admin; | ||
import cat.udl.eps.softarch.tfgfinder.domain.User; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.data.repository.query.Param; | ||
import org.springframework.data.rest.core.annotation.RepositoryRestResource; | ||
|
||
import java.util.List; | ||
|
||
@RepositoryRestResource | ||
public interface AdminRepository extends CrudRepository<Admin, String>, PagingAndSortingRepository<Admin, String> { | ||
List<User> findByIdContaining(@Param("text") String text); | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/cat/udl/eps/softarch/tfgfinder/repository/DirectorRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package cat.udl.eps.softarch.tfgfinder.repository; | ||
|
||
import cat.udl.eps.softarch.tfgfinder.domain.Director; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.data.repository.query.Param; | ||
import org.springframework.data.rest.core.annotation.RepositoryRestResource; | ||
|
||
import java.util.List; | ||
|
||
@RepositoryRestResource | ||
public interface DirectorRepository extends CrudRepository<Director, String>, PagingAndSortingRepository<Director, String> { | ||
List<Director> findByAvailable(@Param("available") Boolean available); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/cat/udl/eps/softarch/tfgfinder/repository/ExternalRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cat.udl.eps.softarch.tfgfinder.repository; | ||
|
||
|
||
import cat.udl.eps.softarch.tfgfinder.domain.External; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.data.repository.query.Param; | ||
import org.springframework.data.rest.core.annotation.RepositoryRestResource; | ||
|
||
import java.util.List; | ||
|
||
@RepositoryRestResource | ||
public interface ExternalRepository extends CrudRepository<External, String>, PagingAndSortingRepository<External, String> { | ||
List<External> findByOrganizationContaining(@Param("organization") String organization); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/cat/udl/eps/softarch/tfgfinder/repository/ProfessorRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cat.udl.eps.softarch.tfgfinder.repository; | ||
|
||
|
||
import cat.udl.eps.softarch.tfgfinder.domain.Professor; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.data.repository.query.Param; | ||
import org.springframework.data.rest.core.annotation.RepositoryRestResource; | ||
|
||
import java.util.List; | ||
|
||
@RepositoryRestResource | ||
public interface ProfessorRepository extends CrudRepository<Professor, String>, PagingAndSortingRepository<Professor, String> { | ||
List<Professor> findByDepartmentContaining(@Param("department") String department); | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/cat/udl/eps/softarch/tfgfinder/repository/StudentRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package cat.udl.eps.softarch.tfgfinder.repository; | ||
|
||
import cat.udl.eps.softarch.tfgfinder.domain.Student; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.data.repository.query.Param; | ||
import org.springframework.data.rest.core.annotation.RepositoryRestResource; | ||
|
||
import java.util.List; | ||
|
||
@RepositoryRestResource | ||
public interface StudentRepository extends CrudRepository<Student, String>, PagingAndSortingRepository<Student, String> { | ||
List<Student> findByNameContaining(@Param("name") String name); | ||
} |