Added docs into repositories
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
af8e2ced28
commit
50c1397db2
@ -9,6 +9,13 @@ import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* AssignmentRepository.getByCommision:
|
||||
* Return list of:
|
||||
* SELECT * FROM Assignment WHERE commision_id = i .
|
||||
*
|
||||
* Where i, ?1 are equale to variables.
|
||||
*/
|
||||
@Repository
|
||||
public interface AssignmentRepository extends JpaRepository<Assignment, Long> {
|
||||
|
||||
|
@ -9,6 +9,19 @@ import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* CommisionRepository.getUsers:
|
||||
* Return list of:
|
||||
* SELECT * FROM Commision WHERE owner_id = i .
|
||||
*
|
||||
* Where i, ?1 are equale to variables.
|
||||
*
|
||||
* CommisionRepository.getNewestCommision
|
||||
* Return list of:
|
||||
* SELECT * FROM Commision WHERE owner_id = i Order by commisionDate desc.
|
||||
*
|
||||
* Where i, ?1 are equale to variables.
|
||||
*/
|
||||
@Repository
|
||||
public interface CommisionRepository extends JpaRepository<Commision, Long> {
|
||||
@Query("FROM Commision WHERE owner_id = ?1")
|
||||
|
@ -9,6 +9,13 @@ import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* CourseRepository.findByName:
|
||||
* Return list of:
|
||||
* SELECT * FROM Course WHERE name = i .
|
||||
*
|
||||
* Where i, ?1 are equale to variables.
|
||||
*/
|
||||
@Repository
|
||||
public interface CourseRepository extends JpaRepository<Course, Long> {
|
||||
@Query("FROM Course WHERE name = ?1")
|
||||
|
@ -10,6 +10,19 @@ import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* GroupRepository.find:
|
||||
* Return list of:
|
||||
* SELECT * FROM Groups WHERE time = i AND room = j AND capacity = k .
|
||||
*
|
||||
* Where i, j, k, ?1, ?2, ?3 are equale to variables.
|
||||
*
|
||||
* GroupRepository.getByCourse:
|
||||
* Return list of:
|
||||
* SELECT * FROM Groups WHERE course_id = i .
|
||||
*
|
||||
* Where i, ?1 are equale to variables.
|
||||
*/
|
||||
@Repository
|
||||
public interface GroupRepository extends JpaRepository<Groups, Long> {
|
||||
@Query("FROM Groups WHERE time = ?1 AND room = ?2 AND capacity = ?3")
|
||||
|
@ -9,6 +9,13 @@ import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* LecturerRepository.find:
|
||||
* Return list of:
|
||||
* SELECT * FROM Lecturer WHERE title = i AND name = j AND surname = k.
|
||||
*
|
||||
* Where i, j, k, ?1, ?2, ?3 are equale to variables.
|
||||
*/
|
||||
@Repository
|
||||
public interface LecturerRepository extends JpaRepository<Lecturer, Long> {
|
||||
@Query("FROM Lecturer WHERE title = ?1 AND name = ?2 AND surname = ?3")
|
||||
|
Loading…
Reference in New Issue
Block a user