Package com.epam.ta.reportportal.dao
Interface TestItemRepositoryCustom
-
- All Superinterfaces:
FilterableRepository<TestItem>
- All Known Subinterfaces:
TestItemRepository
- All Known Implementing Classes:
TestItemRepositoryCustomImpl
public interface TestItemRepositoryCustom extends FilterableRepository<TestItem>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<TestItem>findAllInIssueGroupByLaunch(java.lang.Long launchId, TestItemIssueGroup issueGroup)java.util.List<NestedStep>findAllNestedStepsByIds(java.util.Collection<java.lang.Long> ids, Queryable logFilter, boolean excludePassedLogs)SelectNestedStepentities by provided 'IDs' withNestedStep.attachmentsCountof theLogentities of all descendants for eachNestedStepandNestedStep.hasContentflag to check whether entity is a last one in the descendants tree or there areLogorNestedStepentities exist under itjava.util.List<TestItem>findAllNotInIssueByLaunch(java.lang.Long launchId, java.lang.String locator)Select items that has different issue from provided for specified launch.java.util.List<TestItem>findAllNotInIssueGroupByLaunch(java.lang.Long launchId, TestItemIssueGroup issueGroup)org.springframework.data.domain.Page<TestItem>findByFilter(boolean isLatest, Queryable launchFilter, Queryable testItemFilter, org.springframework.data.domain.Pageable launchPageable, org.springframework.data.domain.Pageable testItemPageable)Executes query built for given filters and maps result for given pageTestItemTypeEnumgetTypeByItemId(java.lang.Long itemId)java.lang.BooleanhasItemsInStatusAddedLately(java.lang.Long launchId, java.time.Duration period, StatusEnum... statuses)True if theTestItemwith matching 'status' and 'launchId' was started within the provided 'period'java.lang.BooleanhasItemsInStatusByLaunch(java.lang.Long launchId, StatusEnum... statuses)True if the provided launch contains any items with a specified status.java.lang.BooleanhasLogs(java.lang.Long launchId, java.time.Duration period, StatusEnum... statuses)True ifTestItemwasn't modified before the provided 'period' and has logsorg.springframework.data.domain.Page<TestItemHistory>loadItemsHistoryPage(boolean isLatest, Queryable launchFilter, Queryable testItemFilter, org.springframework.data.domain.Pageable launchPageable, org.springframework.data.domain.Pageable testItemPageable, java.lang.Long projectId, int historyDepth, boolean usingHash)Loads itemsTestItemHistory-TestItemexecutions from the wholeProjectgrouped byTestItem.getTestCaseHash()ordered byTestItem.getStartTime()`DESCENDING` within group.org.springframework.data.domain.Page<TestItemHistory>loadItemsHistoryPage(boolean isLatest, Queryable launchFilter, Queryable testItemFilter, org.springframework.data.domain.Pageable launchPageable, org.springframework.data.domain.Pageable testItemPageable, java.lang.Long projectId, java.lang.String launchName, int historyDepth, boolean usingHash)Loads itemsTestItemHistory-TestItemexecutions from theProjectwith provided `projectId` andLaunch.getName()equal to the provided `launchName` value.org.springframework.data.domain.Page<TestItemHistory>loadItemsHistoryPage(Queryable filter, org.springframework.data.domain.Pageable pageable, java.lang.Long projectId, int historyDepth, boolean usingHash)Loads itemsTestItemHistory-TestItemexecutions from the wholeProjectgrouped byTestItem.getTestCaseHash()and ordered byTestItem.getStartTime()`DESCENDING` within group.org.springframework.data.domain.Page<TestItemHistory>loadItemsHistoryPage(Queryable filter, org.springframework.data.domain.Pageable pageable, java.lang.Long projectId, java.lang.String launchName, int historyDepth, boolean usingHash)Loads itemsTestItemHistory-TestItemexecutions from theProjectwith provided `projectId` andLaunch.getName()equal to the provided `launchName` value.org.springframework.data.domain.Page<TestItemHistory>loadItemsHistoryPage(Queryable filter, org.springframework.data.domain.Pageable pageable, java.lang.Long projectId, java.util.List<java.lang.Long> launchIds, int historyDepth, boolean usingHash)Loads itemsTestItemHistory-TestItemexecutions from theProjectwith provided `projectId` andLaunchwhich IDs are in provided `launchIds`.java.util.List<TestItem>selectAllDescendants(java.lang.Long itemId)Selects all descendants of TestItem with provided id.java.util.List<TestItem>selectAllDescendantsWithChildren(java.lang.Long itemId)Selects all descendants of TestItem with provided id, which has at least one child.java.util.List<java.lang.Long>selectIdsByAnalyzedWithLevelGte(boolean autoAnalyzed, java.lang.Long launchId, int logLevel)Select item IDs by analyzed status andTestItem.getLaunchId()withLoghavingLog.getLogLevel()greater than or equal toLogLevel.ERROR_INTjava.util.List<java.lang.Long>selectIdsByRegexPatternMatchedLogMessage(Queryable filter, java.lang.Integer logLevel, java.lang.String pattern)Select item IDs by launch ID and issue type ID with logs which level is greater than or equal to provided and message is matched by the REGEX patternjava.util.List<java.lang.Long>selectIdsByStringPatternMatchedLogMessage(Queryable filter, java.lang.Integer logLevel, java.lang.String pattern)Select item IDs by launch ID and issue type ID with logs which level is greater than or equal to provided and message is matched by the STRING patternjava.util.List<java.lang.Long>selectIdsNotInIssueByLaunch(java.lang.Long launchId, java.lang.String locator)Select items that has different issue from provided for specified launch.java.util.List<java.lang.Long>selectIdsNotInIssueGroupByLaunch(java.lang.Long launchId, TestItemIssueGroup issueGroup)java.util.List<java.lang.Long>selectIdsWithIssueByLaunch(java.lang.Long launchId)Select allTestItem.getItemId()ofTestItemwith attachedIssueandTestItem.getLaunchId()equal to provided `launchId`java.util.List<IssueType>selectIssueLocatorsByProject(java.lang.Long projectId)java.util.Optional<IssueType>selectIssueTypeByLocator(java.lang.Long projectId, java.lang.String locator)Selects issue type object by provided locator for specified project.java.util.List<TestItem>selectItemsInIssueByLaunch(java.lang.Long launchId, java.lang.String issueType)Select test items that has issue with provided issue type for specified launch.java.util.List<TestItem>selectItemsInStatusByLaunch(java.lang.Long launchId, StatusEnum... statuses)Select common items object that have provided status for specified launch.java.util.List<TestItem>selectItemsInStatusByParent(java.lang.Long parentId, StatusEnum... statuses)Select common items object that have provided status for specified parent item.java.util.Map<java.lang.Long,java.lang.String>selectPathNames(java.lang.String path)Select unsorted ids and names of all items in a tree till current.java.util.Map<java.lang.Long,PathName>selectPathNames(java.util.Collection<java.lang.Long> id, java.lang.Long porjectId)SelectPathNamecontaining ids and names of all items in a tree till current and launch name and number for each item id from the provided collectionjava.util.List<TestItem>selectRetries(java.util.List<java.lang.Long> retryOfIds)intupdateStatusAndEndTimeById(java.lang.Long itemId, JStatusEnum status, java.time.LocalDateTime endTime)-
Methods inherited from interface com.epam.ta.reportportal.dao.FilterableRepository
findByFilter, findByFilter
-
-
-
-
Method Detail
-
findByFilter
org.springframework.data.domain.Page<TestItem> findByFilter(boolean isLatest, Queryable launchFilter, Queryable testItemFilter, org.springframework.data.domain.Pageable launchPageable, org.springframework.data.domain.Pageable testItemPageable)
Executes query built for given filters and maps result for given page- Parameters:
isLatest- Flag for retrieving only latest launcheslaunchFilter-QueryablewithFilterTarget.LAUNCH_TARGETtestItemFilter-QueryablewithFilterTarget.TEST_ITEM_TARGETlaunchPageable-PageableforLaunchquerytestItemPageable-PageableforTestItemquery- Returns:
- List of mapped entries found
-
loadItemsHistoryPage
org.springframework.data.domain.Page<TestItemHistory> loadItemsHistoryPage(Queryable filter, org.springframework.data.domain.Pageable pageable, java.lang.Long projectId, int historyDepth, boolean usingHash)
Loads itemsTestItemHistory-TestItemexecutions from the wholeProjectgrouped byTestItem.getTestCaseHash()and ordered byTestItem.getStartTime()`DESCENDING` within group. Max group size equals to the provided `historyDepth` value.- Parameters:
filter-Queryablepageable-PageableprojectId-Project.getId()historyDepth- maxTestItemHistorygroup size- Returns:
PagewithTestItemHistoryas content
-
loadItemsHistoryPage
org.springframework.data.domain.Page<TestItemHistory> loadItemsHistoryPage(Queryable filter, org.springframework.data.domain.Pageable pageable, java.lang.Long projectId, java.lang.String launchName, int historyDepth, boolean usingHash)
Loads itemsTestItemHistory-TestItemexecutions from theProjectwith provided `projectId` andLaunch.getName()equal to the provided `launchName` value. Result is grouped byTestItem.getTestCaseHash()and is ordered byTestItem.getStartTime()`DESCENDING` within group. Max group size equals to the provided `historyDepth` value.- Parameters:
filter-Queryablepageable-PageableprojectId-Project.getId()launchName- Name of theLaunchwhichTestItemshould be retrievedhistoryDepth- MaxTestItemHistorygroup size- Returns:
PagewithTestItemHistoryas content
-
loadItemsHistoryPage
org.springframework.data.domain.Page<TestItemHistory> loadItemsHistoryPage(Queryable filter, org.springframework.data.domain.Pageable pageable, java.lang.Long projectId, java.util.List<java.lang.Long> launchIds, int historyDepth, boolean usingHash)
Loads itemsTestItemHistory-TestItemexecutions from theProjectwith provided `projectId` andLaunchwhich IDs are in provided `launchIds`. Result is grouped byTestItem.getTestCaseHash()and is ordered byTestItem.getStartTime()`DESCENDING` within group. Max group size equals to the provided `historyDepth` value.- Parameters:
filter-Queryablepageable-PageableprojectId-Project.getId()launchIds- IDs of theLaunches whichTestItemshould be retrievedhistoryDepth- MaxTestItemHistorygroup size- Returns:
PagewithTestItemHistoryas content
-
loadItemsHistoryPage
org.springframework.data.domain.Page<TestItemHistory> loadItemsHistoryPage(boolean isLatest, Queryable launchFilter, Queryable testItemFilter, org.springframework.data.domain.Pageable launchPageable, org.springframework.data.domain.Pageable testItemPageable, java.lang.Long projectId, int historyDepth, boolean usingHash)
Loads itemsTestItemHistory-TestItemexecutions from the wholeProjectgrouped byTestItem.getTestCaseHash()ordered byTestItem.getStartTime()`DESCENDING` within group. Max group size equals to the provided `historyDepth` value. Items result query is built from filters withFilterTarget.LAUNCH_TARGETandFilterTarget.TEST_ITEM_TARGET- Parameters:
isLatest- Flag for retrieving only latest launcheslaunchFilter-QueryableforLaunchquerytestItemFilter-QueryableforTestItemquerylaunchPageable-PageableforLaunchquerytestItemPageable-PageableforTestItemqueryprojectId-Project.getId()historyDepth- MaxTestItemHistorygroup size- Returns:
PagewithTestItemHistoryas content
-
loadItemsHistoryPage
org.springframework.data.domain.Page<TestItemHistory> loadItemsHistoryPage(boolean isLatest, Queryable launchFilter, Queryable testItemFilter, org.springframework.data.domain.Pageable launchPageable, org.springframework.data.domain.Pageable testItemPageable, java.lang.Long projectId, java.lang.String launchName, int historyDepth, boolean usingHash)
Loads itemsTestItemHistory-TestItemexecutions from theProjectwith provided `projectId` andLaunch.getName()equal to the provided `launchName` value. Result is grouped byTestItem.getTestCaseHash()and is ordered byTestItem.getStartTime()`DESCENDING` within group. Max group size equals to the provided `historyDepth` value. Items result query is built from filters withFilterTarget.LAUNCH_TARGETandFilterTarget.TEST_ITEM_TARGET- Parameters:
isLatest- Flag for retrieving only latest launcheslaunchFilter-QueryableforLaunchquerytestItemFilter-QueryableforTestItemquerylaunchPageable-PageableforLaunchquerytestItemPageable-PageableforTestItemqueryprojectId-Project.getId()launchName- Name of theLaunchwhichTestItemshould be retrievedhistoryDepth- MaxTestItemHistorygroup size- Returns:
PagewithTestItemHistoryas content
-
selectAllDescendants
java.util.List<TestItem> selectAllDescendants(java.lang.Long itemId)
Selects all descendants of TestItem with provided id.- Parameters:
itemId- TestItem id- Returns:
- List of all descendants
-
selectAllDescendantsWithChildren
java.util.List<TestItem> selectAllDescendantsWithChildren(java.lang.Long itemId)
Selects all descendants of TestItem with provided id, which has at least one child.- Parameters:
itemId- TestItem id- Returns:
- List of descendants
-
selectItemsInStatusByLaunch
java.util.List<TestItem> selectItemsInStatusByLaunch(java.lang.Long launchId, StatusEnum... statuses)
Select common items object that have provided status for specified launch.- Parameters:
launchId- Launchstatuses- Statuses- Returns:
- List of items
-
selectItemsInStatusByParent
java.util.List<TestItem> selectItemsInStatusByParent(java.lang.Long parentId, StatusEnum... statuses)
Select common items object that have provided status for specified parent item.- Parameters:
parentId- Parent itemstatuses- Statuses- Returns:
- List of items
-
hasItemsInStatusByLaunch
java.lang.Boolean hasItemsInStatusByLaunch(java.lang.Long launchId, StatusEnum... statuses)True if the provided launch contains any items with a specified status.- Parameters:
launchId- Checking launch idstatuses- Checking statuses- Returns:
- True if contains, false if not
-
findAllNotInIssueByLaunch
java.util.List<TestItem> findAllNotInIssueByLaunch(java.lang.Long launchId, java.lang.String locator)
Select items that has different issue from provided for specified launch.- Parameters:
launchId- Launchlocator- Issue type locator- Returns:
- List of items
-
selectIdsNotInIssueByLaunch
java.util.List<java.lang.Long> selectIdsNotInIssueByLaunch(java.lang.Long launchId, java.lang.String locator)Select items that has different issue from provided for specified launch.- Parameters:
launchId- Launchlocator- Issue type locator- Returns:
- List of items
-
findAllNotInIssueGroupByLaunch
java.util.List<TestItem> findAllNotInIssueGroupByLaunch(java.lang.Long launchId, TestItemIssueGroup issueGroup)
-
selectIdsNotInIssueGroupByLaunch
java.util.List<java.lang.Long> selectIdsNotInIssueGroupByLaunch(java.lang.Long launchId, TestItemIssueGroup issueGroup)
-
findAllInIssueGroupByLaunch
java.util.List<TestItem> findAllInIssueGroupByLaunch(java.lang.Long launchId, TestItemIssueGroup issueGroup)
-
selectIdsWithIssueByLaunch
java.util.List<java.lang.Long> selectIdsWithIssueByLaunch(java.lang.Long launchId)
Select allTestItem.getItemId()ofTestItemwith attachedIssueandTestItem.getLaunchId()equal to provided `launchId`- Parameters:
launchId-TestItem.getLaunchId()- Returns:
ListofTestItem.getItemId()
-
hasItemsInStatusAddedLately
java.lang.Boolean hasItemsInStatusAddedLately(java.lang.Long launchId, java.time.Duration period, StatusEnum... statuses)True if theTestItemwith matching 'status' and 'launchId' was started within the provided 'period'- Parameters:
period-DurationlaunchId-Launch.idstatuses-StatusEnum- Returns:
- true if items(the item) exist(exists)
-
hasLogs
java.lang.Boolean hasLogs(java.lang.Long launchId, java.time.Duration period, StatusEnum... statuses)True ifTestItemwasn't modified before the provided 'period' and has logs- Parameters:
launchId-Launch.idperiod-Durationstatuses-StatusEnum- Returns:
- true if
TestItemwasn't modified before the provided 'period' and has logs
-
selectItemsInIssueByLaunch
java.util.List<TestItem> selectItemsInIssueByLaunch(java.lang.Long launchId, java.lang.String issueType)
Select test items that has issue with provided issue type for specified launch.- Parameters:
launchId- Launch idissueType- Issue type- Returns:
- List of items
-
selectRetries
java.util.List<TestItem> selectRetries(java.util.List<java.lang.Long> retryOfIds)
-
selectIssueLocatorsByProject
java.util.List<IssueType> selectIssueLocatorsByProject(java.lang.Long projectId)
-
selectIssueTypeByLocator
java.util.Optional<IssueType> selectIssueTypeByLocator(java.lang.Long projectId, java.lang.String locator)
Selects issue type object by provided locator for specified project.- Parameters:
projectId- Project idlocator- Issue type locator- Returns:
- Issue type
-
selectPathNames
java.util.Map<java.lang.Long,java.lang.String> selectPathNames(java.lang.String path)
Select unsorted ids and names of all items in a tree till current.- Parameters:
path- itemPath- Returns:
- Map of id and name
-
selectPathNames
java.util.Map<java.lang.Long,PathName> selectPathNames(java.util.Collection<java.lang.Long> id, java.lang.Long porjectId)
SelectPathNamecontaining ids and names of all items in a tree till current and launch name and number for each item id from the provided collection- Parameters:
ids-CollectionofTestItem.getItemId()porjectId- Project- Returns:
- id from collection ->
PathName
-
selectIdsByAnalyzedWithLevelGte
java.util.List<java.lang.Long> selectIdsByAnalyzedWithLevelGte(boolean autoAnalyzed, java.lang.Long launchId, int logLevel)Select item IDs by analyzed status andTestItem.getLaunchId()withLoghavingLog.getLogLevel()greater than or equal toLogLevel.ERROR_INT- Parameters:
autoAnalyzed-Issue.getAutoAnalyzed()launchId-TestItem.getLaunchId()logLevel-Log.getLogLevel()- Returns:
- The
Listof theTestItem.getItemId()
-
updateStatusAndEndTimeById
int updateStatusAndEndTimeById(java.lang.Long itemId, JStatusEnum status, java.time.LocalDateTime endTime)- Parameters:
itemId-TestItem.itemIdstatus- New statusendTime-TestItemResults.endTime- Returns:
- 1 if updated, otherwise 0
-
getTypeByItemId
TestItemTypeEnum getTypeByItemId(java.lang.Long itemId)
- Parameters:
itemId-TestItem.itemId- Returns:
TestItemTypeEnum
-
selectIdsByStringPatternMatchedLogMessage
java.util.List<java.lang.Long> selectIdsByStringPatternMatchedLogMessage(Queryable filter, java.lang.Integer logLevel, java.lang.String pattern)
Select item IDs by launch ID and issue type ID with logs which level is greater than or equal to provided and message is matched by the STRING pattern- Parameters:
filter-QueryablelogLevel-Log.logLevelpattern- CASE SENSITIVE STRING pattern for log message search- Returns:
- The
Listof theTestItem.itemId
-
selectIdsByRegexPatternMatchedLogMessage
java.util.List<java.lang.Long> selectIdsByRegexPatternMatchedLogMessage(Queryable filter, java.lang.Integer logLevel, java.lang.String pattern)
Select item IDs by launch ID and issue type ID with logs which level is greater than or equal to provided and message is matched by the REGEX pattern- Parameters:
filter-QueryablelogLevel-Log.logLevelpattern- REGEX pattern for log message search- Returns:
- The
Listof theTestItem.itemId
-
findAllNestedStepsByIds
java.util.List<NestedStep> findAllNestedStepsByIds(java.util.Collection<java.lang.Long> ids, Queryable logFilter, boolean excludePassedLogs)
SelectNestedStepentities by provided 'IDs' withNestedStep.attachmentsCountof theLogentities of all descendants for eachNestedStepandNestedStep.hasContentflag to check whether entity is a last one in the descendants tree or there areLogorNestedStepentities exist under it- Parameters:
ids-Collectionof theTestItem.itemIdlogFilter-QueryablewithLogtarget, to evaluate 'hasContent' flag and attachments count- Returns:
Listof theNestedStep
-
-