Interface EdaPermissionEventRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<PersistablePermissionEvent,,Long> org.springframework.data.jpa.repository.JpaRepository<PersistablePermissionEvent,,Long> org.springframework.data.repository.ListCrudRepository<PersistablePermissionEvent,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<PersistablePermissionEvent,,Long> org.springframework.data.repository.PagingAndSortingRepository<PersistablePermissionEvent,,Long> PermissionEventRepository,org.springframework.data.repository.query.QueryByExampleExecutor<PersistablePermissionEvent>,org.springframework.data.repository.Repository<PersistablePermissionEvent,Long>
@Repository
public interface EdaPermissionEventRepository
extends org.springframework.data.jpa.repository.JpaRepository<PersistablePermissionEvent,Long>, PermissionEventRepository
-
Method Summary
Modifier and TypeMethodDescriptionfindFirstByPermissionIdInOrderByIdAsc(List<String> permissionIds) findInconsistentPermissionIds(List<String> permissionIds) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface energy.eddie.api.agnostic.process.model.events.PermissionEventRepository
findTop2ByPermissionIdAndEventCreatedLessThanEqualOrderByEventCreatedDesc, saveAndFlushMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findFirstByPermissionIdInOrderByIdAsc
@Lock(PESSIMISTIC_WRITE) Optional<PersistablePermissionEvent> findFirstByPermissionIdInOrderByIdAsc(List<String> permissionIds) -
findInconsistentPermissionIds
@Query("SELECT event.permissionId FROM AcceptedEvent event\nWHERE event.permissionId IN :permissionIds\nGROUP BY event.permissionId\nHAVING COUNT(DISTINCT event.meteringPointId) > 1 OR COUNT(DISTINCT event.cmConsentId) > 1\n") List<String> findInconsistentPermissionIds(@Param("permissionIds") List<String> permissionIds)
-