Skip to content

Commit

Permalink
Fix repo type
Browse files Browse the repository at this point in the history
  • Loading branch information
darcato committed Nov 28, 2023
1 parent 5fbbceb commit e91e7e6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.repository.query.Param;

import it.infn.mw.iam.persistence.model.IamClientLastUsed;

public interface IamClientLastUsedRepository
extends CrudRepository<IamClientLastUsed, Long>, JpaSpecificationExecutor<IamClientLastUsed> {
extends PagingAndSortingRepository<IamClientLastUsed, Long>,
JpaSpecificationExecutor<IamClientLastUsed> {

Page<IamClientLastUsed> findByClientId(Long clientId, Pageable pageable);
Page<IamClientLastUsed> findAll(Pageable pageable);
Page<IamClientLastUsed> findByClientId(Long clientId, Pageable pageable);


@Transactional
@Modifying
@Query("UPDATE IamClientLastUsed iclu SET iclu.lastUsed = CURRENT_DATE WHERE iclu.clientId = :clientId")
void updateLastUsedByClientId(@Param("clientId") Long clientId);
}
}

0 comments on commit e91e7e6

Please sign in to comment.