Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package repositories;
- import java.util.List;
- import org.springframework.data.jpa.repository.JpaRepository;
- import org.springframework.data.jpa.repository.Query;
- import org.springframework.stereotype.Repository;
- import domain.Golub;
- @Repository
- public interface GolubRepository extends JpaRepository<Golub, Integer> {
- @Query("select g from Golub g where g.conference.id = ?1")
- List<Golub> findGolubByConference(int conferenceId);
- @Query("select g from Golub g where g.administrator.id = ?1")
- List<Golub> findGolubByAdministrator(int administratorId);
- @Query("select avg(1.0*(select count(g) from Golub g where g.conference.id=c.id)), stddev(1.0*(select count(g) from Golub g where g.conference.id=c.id)) from Conference c")
- Double[] getGolubsPerConferenceStats();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement