main
Last change
on this file since ac151d1 was ac151d1, checked in by David <darsov2@…>, 11 days ago |
initial
|
-
Property mode
set to
100644
|
File size:
705 bytes
|
Line | |
---|
1 | package mk.ukim.finki.eglas.repository;
|
---|
2 |
|
---|
3 | import mk.ukim.finki.eglas.model.Citizen;
|
---|
4 | import mk.ukim.finki.eglas.model.VotingCode;
|
---|
5 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
6 | import org.springframework.data.jpa.repository.Query;
|
---|
7 | import org.springframework.data.repository.query.Param;
|
---|
8 |
|
---|
9 | import java.util.Optional;
|
---|
10 |
|
---|
11 | public interface VotingCodeRepository extends JpaRepository<VotingCode, Long> {
|
---|
12 | VotingCode findByCode(String code);
|
---|
13 | Optional<VotingCode> findByCitizen_IdAndElectionRealization_Id(Long citizenId, Long electionRealizationId);
|
---|
14 | @Query("select vc.citizen from VotingCode vc where vc.code = :code")
|
---|
15 | Optional<Citizen> findCitizenByCode(@Param("code") String code);
|
---|
16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.