source: src/main/java/mk/ukim/finki/eglas/repository/VoteIdentificationCodeRepository.java@ ac151d1

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: 571 bytes
Line 
1package mk.ukim.finki.eglas.repository;
2
3import mk.ukim.finki.eglas.model.VoteIdentificationCode;
4import org.springframework.data.jpa.repository.JpaRepository;
5import org.springframework.data.jpa.repository.Query;
6
7import java.util.Optional;
8import java.util.UUID;
9
10public interface VoteIdentificationCodeRepository extends JpaRepository<VoteIdentificationCode, UUID> {
11 @Query(value = "select * from kodovi_za_identifikacija where used = false order by random() limit 1", nativeQuery = true)
12 Optional<VoteIdentificationCode> findRandomVoteIdentificationCode();
13}
Note: See TracBrowser for help on using the repository browser.