Ignore:
Timestamp:
01/09/24 01:26:08 (11 months ago)
Author:
ppaunovski <paunovskipavel@…>
Branches:
master
Children:
e272096
Parents:
b101b69
Message:

All 3 main use cases implemented.

  1. Starting a commute
  2. Writing a ticket
  3. Starting an instance of a Bus Line
Location:
src/main/java/mk/ukim/finki/busngo/repository
Files:
11 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/mk/ukim/finki/busngo/repository/BiletRepository.java

    rb101b69 rbde8b13  
    88
    99import java.util.List;
     10import java.util.Optional;
    1011
    1112
     
    1314//    List<Bilet> findAllByKorisnikByPatnikKIdAndBStatus(Korisnik korisnik, BILET_STATUS status);
    1415//    List<Bilet> findAllByKorisnikByPatnikKId(Korisnik korisnik);
     16    Optional<Bilet> findByBIdAndAndKorisnikByPatnikKId(Long bid, Patnik patnik);
    1517}
  • src/main/java/mk/ukim/finki/busngo/repository/KorisnikRepository.java

    rb101b69 rbde8b13  
    55import org.springframework.data.jpa.repository.JpaRepository;
    66import org.springframework.data.jpa.repository.Query;
     7import org.springframework.data.repository.NoRepositoryBean;
    78
    89import java.util.Optional;
     10
    911
    1012public interface KorisnikRepository extends JpaRepository<Korisnik, Long> {
  • src/main/java/mk/ukim/finki/busngo/repository/PatnikRepository.java

    rb101b69 rbde8b13  
    33import mk.ukim.finki.busngo.model.entities.Patnik;
    44import org.springframework.data.jpa.repository.JpaRepository;
     5import org.springframework.data.jpa.repository.Query;
    56import org.springframework.stereotype.Repository;
    67
     8import java.util.List;
     9import java.util.Optional;
     10
    711public interface PatnikRepository extends JpaRepository<Patnik, Long> {
    8 
     12    @Query("SELECT p from Patnik p where p.kEmail = ?1")
     13    Optional<Patnik> findByKEmail(String email);
    914}
Note: See TracChangeset for help on using the changeset viewer.