Package org.exoplatform.agenda.dao
Interface CalendarSubscriptionEventDAO
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<CalendarSubscriptionEventEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<CalendarSubscriptionEventEntity,,Long> org.springframework.data.repository.ListCrudRepository<CalendarSubscriptionEventEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<CalendarSubscriptionEventEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<CalendarSubscriptionEventEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<CalendarSubscriptionEventEntity>,org.springframework.data.repository.Repository<CalendarSubscriptionEventEntity,Long>
public interface CalendarSubscriptionEventDAO
extends org.springframework.data.jpa.repository.JpaRepository<CalendarSubscriptionEventEntity,Long>
Reads and writes the occurrences subscriptions imported (EXO-90278). A
subscription holds a bounded number of them, and every read is paged all the
same.
-
Method Summary
Modifier and TypeMethodDescriptionintdeleteBySubscriptionId(long subscriptionId) Deletes every occurrence row of a subscription; the events themselves are the caller's to delete.findBySubscriptionId(long subscriptionId, org.springframework.data.domain.Pageable pageable) Finds the occurrences a subscription imported.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 org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findBySubscriptionId
List<CalendarSubscriptionEventEntity> findBySubscriptionId(long subscriptionId, org.springframework.data.domain.Pageable pageable) Finds the occurrences a subscription imported.- Parameters:
subscriptionId- technical identifier of the subscriptionpageable- the page- Returns:
- the rows, never null
-
deleteBySubscriptionId
@Transactional @Modifying(clearAutomatically=true, flushAutomatically=true) @Query("DELETE FROM AgendaCalendarSubscriptionEvent e WHERE e.subscriptionId = :subscriptionId") int deleteBySubscriptionId(@Param("subscriptionId") long subscriptionId) Deletes every occurrence row of a subscription; the events themselves are the caller's to delete.- Parameters:
subscriptionId- technical identifier of the subscription- Returns:
- how many rows were deleted
-