Package com.epam.ta.reportportal.dao
Interface LogRepositoryCustom
-
- All Superinterfaces:
FilterableRepository<Log>
- All Known Subinterfaces:
LogRepository
- All Known Implementing Classes:
LogRepositoryCustomImpl
public interface LogRepositoryCustom extends FilterableRepository<Log>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intdeleteByPeriodAndTestItemIds(java.time.Duration period, java.util.Collection<java.lang.Long> testItemIds)java.util.List<Log>findAllUnderTestItemByLaunchIdAndTestItemIdsAndLogLevelGte(java.lang.Long launchId, java.util.List<java.lang.Long> itemIds, int logLevel)java.util.List<Log>findByTestItemId(java.lang.Long itemId)Load specified number of last logs for specified test item.java.util.List<Log>findByTestItemId(java.lang.Long itemId, int limit)Load specified number of last logs for specified test item.java.util.List<java.lang.Long>findIdsByFilter(Queryable filter)java.util.List<java.lang.Long>findIdsByTestItemId(java.lang.Long testItemId)java.util.List<java.lang.Long>findIdsByTestItemIdsAndLogLevelGte(java.util.List<java.lang.Long> itemIds, int logLevel)java.util.List<java.lang.Long>findIdsUnderTestItemByLaunchIdAndTestItemIdsAndLogLevelGte(java.lang.Long launchId, java.util.List<java.lang.Long> itemIds, int logLevel)java.util.List<java.lang.Long>findItemLogIdsByLaunchIdAndLogLevelGte(java.lang.Long launchId, int logLevel)java.util.List<java.lang.Long>findItemLogIdsByLaunchIdsAndLogLevelGte(java.util.List<java.lang.Long> launchIds, int logLevel)java.util.List<java.lang.String>findMessagesByItemIdAndLevelGte(java.lang.Long itemId, java.lang.Integer level)Retrieves log message of specified test item with log level greather or equals thanlevelorg.springframework.data.domain.Page<NestedItem>findNestedItems(java.lang.Long parentId, boolean excludeEmptySteps, boolean excludeLogs, Queryable filter, org.springframework.data.domain.Pageable pageable)java.lang.IntegergetPageNumber(java.lang.Long id, Filter filter, org.springframework.data.domain.Pageable pageable)Get the specified log's page numberbooleanhasLogs(java.lang.Long itemId)Checks if the test item has any logs.booleanhasLogsAddedLately(java.time.Duration period, java.lang.Long launchId, StatusEnum... statuses)True if theTestItemwith matching 'status' and 'launchId' hasLog's withLog.lastModifiedup to the current point of time minus provided 'period'-
Methods inherited from interface com.epam.ta.reportportal.dao.FilterableRepository
findByFilter, findByFilter
-
-
-
-
Method Detail
-
hasLogs
boolean hasLogs(java.lang.Long itemId)
Checks if the test item has any logs.- Parameters:
itemId- Item id- Returns:
- true if logs were found
-
findByTestItemId
java.util.List<Log> findByTestItemId(java.lang.Long itemId, int limit)
Load specified number of last logs for specified test item. binaryData field will be loaded if it specified in appropriate input parameter, all other fields will be fully loaded.- Parameters:
limit- Max count of logs to be loadeditemId- Test Item log belongs to- Returns:
- Found logs
-
findByTestItemId
java.util.List<Log> findByTestItemId(java.lang.Long itemId)
Load specified number of last logs for specified test item. binaryData field will be loaded if it specified in appropriate input parameter, all other fields will be fully loaded.- Parameters:
itemId- Test Item log belongs to- Returns:
- Found logs
-
findAllUnderTestItemByLaunchIdAndTestItemIdsAndLogLevelGte
java.util.List<Log> findAllUnderTestItemByLaunchIdAndTestItemIdsAndLogLevelGte(java.lang.Long launchId, java.util.List<java.lang.Long> itemIds, int logLevel)
- Parameters:
launchId- ID of theLaunchto searchLogunderitemIds-Listof theLog.getTestItem()IDslogLevel-Log.getLogLevel()- Returns:
ListofLog
-
findIdsByFilter
java.util.List<java.lang.Long> findIdsByFilter(Queryable filter)
-
findIdsByTestItemId
java.util.List<java.lang.Long> findIdsByTestItemId(java.lang.Long testItemId)
-
findIdsUnderTestItemByLaunchIdAndTestItemIdsAndLogLevelGte
java.util.List<java.lang.Long> findIdsUnderTestItemByLaunchIdAndTestItemIdsAndLogLevelGte(java.lang.Long launchId, java.util.List<java.lang.Long> itemIds, int logLevel)- Parameters:
launchId- ID of theLaunchto searchLogunderitemIds-Listof theLog.getTestItem()IDslogLevel-Log.getLogLevel()- Returns:
ListofLog.getId()
-
findItemLogIdsByLaunchIdAndLogLevelGte
java.util.List<java.lang.Long> findItemLogIdsByLaunchIdAndLogLevelGte(java.lang.Long launchId, int logLevel)
-
findItemLogIdsByLaunchIdsAndLogLevelGte
java.util.List<java.lang.Long> findItemLogIdsByLaunchIdsAndLogLevelGte(java.util.List<java.lang.Long> launchIds, int logLevel)
-
findIdsByTestItemIdsAndLogLevelGte
java.util.List<java.lang.Long> findIdsByTestItemIdsAndLogLevelGte(java.util.List<java.lang.Long> itemIds, int logLevel)
-
getPageNumber
java.lang.Integer getPageNumber(java.lang.Long id, Filter filter, org.springframework.data.domain.Pageable pageable)Get the specified log's page number- Parameters:
id- ID of log page should be found offilter- Filterpageable- Page details- Returns:
- Page number log found using specified filter
-
hasLogsAddedLately
boolean hasLogsAddedLately(java.time.Duration period, java.lang.Long launchId, StatusEnum... statuses)True if theTestItemwith matching 'status' and 'launchId' hasLog's withLog.lastModifiedup to the current point of time minus provided 'period'- Parameters:
period-DurationlaunchId-Launch.idstatuses-StatusEnum- Returns:
- true if logs(the log) exist(exists)
-
deleteByPeriodAndTestItemIds
int deleteByPeriodAndTestItemIds(java.time.Duration period, java.util.Collection<java.lang.Long> testItemIds)- Parameters:
period-DurationtestItemIds- Collection of theTestItem.itemIdreferenced fromLog.testItem- Returns:
- Count of removed logs
-
findNestedItems
org.springframework.data.domain.Page<NestedItem> findNestedItems(java.lang.Long parentId, boolean excludeEmptySteps, boolean excludeLogs, Queryable filter, org.springframework.data.domain.Pageable pageable)
RetrieveLogandTestItementities' ids, differentiated by entity typeLogandTestItementities filtered and sorted on the DB level and returned as UNION parsed into theNestedItementity- Parameters:
parentId-TestItem.itemIdof the parent itemfilter-QueryableexcludeEmptySteps- Exclude steps without content (logs and child items)excludeLogs- Exclude logs selectionpageable-Pageable- Returns:
PagewithNestedItemas content
-
findMessagesByItemIdAndLevelGte
java.util.List<java.lang.String> findMessagesByItemIdAndLevelGte(java.lang.Long itemId, java.lang.Integer level)Retrieves log message of specified test item with log level greather or equals thanlevel- Parameters:
itemId- ID ofTestItemlevel- log level- Returns:
ListofStringof log messages
-
-