Interface ElectionRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<VoteBO,String>, org.springframework.data.jpa.repository.JpaRepository<VoteBO,String>, org.springframework.data.repository.ListCrudRepository<VoteBO,String>, org.springframework.data.repository.ListPagingAndSortingRepository<VoteBO,String>, org.springframework.data.repository.PagingAndSortingRepository<VoteBO,String>, org.springframework.data.repository.query.QueryByExampleExecutor<VoteBO>, org.springframework.data.repository.Repository<VoteBO,String>

public interface ElectionRepository extends org.springframework.data.jpa.repository.JpaRepository<VoteBO,String>
  • Method Summary

    Modifier and Type
    Method
    Description
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • countVotes

      @Query("select choice, count(id), max(date) from VoteBO group by choice order by count(id) DESC") List<Object[]> countVotes()