Last change
on this file since 97fbc67 was 97fbc67, checked in by andrejTavchioski <andrej.tavchioski@…>, 3 years ago |
fixed deleteVraboten and deleteRegistriranParkirac
|
-
Property mode
set to
100644
|
File size:
747 bytes
|
Rev | Line | |
---|
[ce6ad22] | 1 | package parkup.repositories;
|
---|
| 2 |
|
---|
| 3 | import java.util.Optional;
|
---|
| 4 | import org.springframework.data.jpa.repository.JpaRepository;
|
---|
[97fbc67] | 5 | import org.springframework.data.jpa.repository.Modifying;
|
---|
| 6 | import org.springframework.data.jpa.repository.Query;
|
---|
| 7 | import org.springframework.stereotype.Repository;
|
---|
[ce6ad22] | 8 | import parkup.entities.Vraboten;
|
---|
| 9 |
|
---|
[97fbc67] | 10 | import javax.transaction.Transactional;
|
---|
| 11 |
|
---|
| 12 | @Repository
|
---|
[ce6ad22] | 13 | public interface VrabotenRepository extends JpaRepository<Vraboten, Integer> {
|
---|
| 14 | Vraboten findByVrabotenId(int id);
|
---|
| 15 |
|
---|
| 16 | void deleteByVrabotenId(int id);
|
---|
| 17 |
|
---|
| 18 | Optional<Vraboten> findVrabotenByEmail(String email);
|
---|
[97fbc67] | 19 |
|
---|
| 20 | @Transactional
|
---|
| 21 | @Modifying
|
---|
| 22 | @Query("UPDATE Vraboten v " +
|
---|
| 23 | "SET v.enabled = TRUE WHERE v.email = ?1")
|
---|
| 24 | int enableVraboten(String email);
|
---|
[ce6ad22] | 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.