diff options
Diffstat (limited to 'portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextDao.java')
-rw-r--r-- | portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextDao.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextDao.java b/portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextDao.java index 8faac5b6..df251027 100644 --- a/portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextDao.java +++ b/portal-BE/src/main/java/org/onap/portal/service/sharedContext/FnSharedContextDao.java @@ -40,8 +40,13 @@ package org.onap.portal.service.sharedContext; +import java.time.LocalDateTime; +import java.util.List; +import java.util.Optional; import org.onap.portal.domain.db.fn.FnSharedContext; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; @@ -49,4 +54,11 @@ import org.springframework.transaction.annotation.Transactional; @Transactional interface FnSharedContextDao extends JpaRepository<FnSharedContext, Long> { + @Query + Optional<List<FnSharedContext>> getByContextId(@Param("contextId") final String contextId); + @Query + Optional<List<FnSharedContext>> getByContextIdAndCkey(@Param("contextId") final String contextId, @Param("ckey") final String ckey); + @Query + void deleteByCreated(@Param("created") final LocalDateTime created); + } |