Interface IncrementalSyncSubscriptionRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<IncrementalSyncSubscriptionEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<IncrementalSyncSubscriptionEntity,,Long> org.springframework.data.repository.ListCrudRepository<IncrementalSyncSubscriptionEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<IncrementalSyncSubscriptionEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<IncrementalSyncSubscriptionEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<IncrementalSyncSubscriptionEntity>,org.springframework.data.repository.Repository<IncrementalSyncSubscriptionEntity,Long>
@Repository
public interface IncrementalSyncSubscriptionRepository
extends org.springframework.data.jpa.repository.JpaRepository<IncrementalSyncSubscriptionEntity,Long>
- Since:
- 10.0.0
-
Method Summary
Modifier and TypeMethodDescriptionfindSubscriptionByContextKey(String context) Get all subscription within a contextdefault List<IncrementalSyncSubscriptionEntity> findSubscriptionsByContextKeyAndState(String contextKey, IncrementalSyncState state) Get all subscription within a context and statefindSubscriptionsByContextKeyAndState(String contextKey, String state) Get all subscription within a context and stategetSubscriptionById(long id) Get Subscription by IdintremoveAllSubscriptionsByContextKey(String contextKey) Remove all subscription belong to a context keydefault intremoveDeletedSubscriptions(String contextKey) Remove deleted subscription belong to a context keyintremoveExpiredSubscriptions(String contextKey, Instant ttl) Remove expired subscription belong to a context keyintremoveSubscriptionById(long id) Remove subscription using iddefault intremoveSubscriptionsByContextKeyAndState(String contextKey, IncrementalSyncState state) Remove deleted subscription belong to a context key and stateintremoveSubscriptionsByContextKeyAndState(String contextKey, String state) Remove deleted subscription belong to a context key and statestore(IncrementalSyncSubscriptionEntity subscription) Add or update anIncrementalSyncSubscriptionEntity.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
-
store
Add or update anIncrementalSyncSubscriptionEntity. This method will update setLastAccessTime -
getSubscriptionById
Get Subscription by Id -
findSubscriptionByContextKey
Get all subscription within a context -
findSubscriptionsByContextKeyAndState
List<IncrementalSyncSubscriptionEntity> findSubscriptionsByContextKeyAndState(String contextKey, String state) Get all subscription within a context and state -
findSubscriptionsByContextKeyAndState
default List<IncrementalSyncSubscriptionEntity> findSubscriptionsByContextKeyAndState(String contextKey, IncrementalSyncState state) Get all subscription within a context and state -
removeSubscriptionById
int removeSubscriptionById(long id) Remove subscription using id -
removeAllSubscriptionsByContextKey
@Modifying @Query("delete from IncrementalSyncSubscriptionEntity s where s.contextKey= ?1") int removeAllSubscriptionsByContextKey(String contextKey) Remove all subscription belong to a context key -
removeExpiredSubscriptions
@Modifying @Query("delete from IncrementalSyncSubscriptionEntity s where s.contextKey=?1 and s.lastAccessTime < ?2") int removeExpiredSubscriptions(String contextKey, Instant ttl) Remove expired subscription belong to a context key -
removeSubscriptionsByContextKeyAndState
@Modifying @Query("delete from IncrementalSyncSubscriptionEntity s where s.contextKey=?1 and s.state = ?2") int removeSubscriptionsByContextKeyAndState(String contextKey, String state) Remove deleted subscription belong to a context key and state -
removeSubscriptionsByContextKeyAndState
Remove deleted subscription belong to a context key and state -
removeDeletedSubscriptions
Remove deleted subscription belong to a context key
-