Package com.epam.ta.reportportal.dao
Class TestItemRepositoryCustomImpl
- java.lang.Object
-
- com.epam.ta.reportportal.dao.TestItemRepositoryCustomImpl
-
- All Implemented Interfaces:
FilterableRepository<TestItem>,TestItemRepositoryCustom
@Repository public class TestItemRepositoryCustomImpl extends java.lang.Object implements TestItemRepositoryCustom
-
-
Constructor Summary
Constructors Constructor Description TestItemRepositoryCustomImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<Statistics>accumulateStatisticsByFilter(Queryable filter)Gets accumulated statistics of items queried by provided filterjava.util.Set<Statistics>accumulateStatisticsByFilterNotFromBaseline(Queryable targetFilter, Queryable baselineFilter)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 itorg.springframework.data.domain.Page<TestItem>findAllNotFromBaseline(Queryable targetFilter, Queryable baselineFilter, org.springframework.data.domain.Pageable pageable)java.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 pagejava.util.List<TestItem>findByFilter(Queryable filter)Executes query built for given filterorg.springframework.data.domain.Page<TestItem>findByFilter(Queryable filter, org.springframework.data.domain.Pageable pageable)Executes query built for given filter and maps result for given pagejava.util.Optional<java.lang.Long>findIdByFilter(Queryable filter, org.springframework.data.domain.Sort sort)java.util.List<com.epam.ta.reportportal.ws.model.analyzer.IndexTestItem>findIndexTestItemByLaunchId(java.lang.Long launchId, java.util.Collection<JTestItemTypeEnum> itemTypes)java.util.List<java.lang.Long>findTestItemIdsByLaunchId(java.lang.Long launchId, org.springframework.data.domain.Pageable pageable)TestItemTypeEnumgetTypeByItemId(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, boolean ignoreAnalyzer, java.lang.Long launchId, int logLevel)Logentities are searched from the whole tree underTestItemthat matched to the provided `launchId` and `autoAnalyzed` conditionsjava.util.List<java.lang.Long>selectIdsByFilter(java.lang.Long launchId, Queryable filter, int limit, int offset)java.util.List<java.lang.Long>selectIdsByHasDescendants(java.util.Collection<java.lang.Long> itemIds)Select ids of items that has descendantsjava.util.List<java.lang.Long>selectIdsByRegexLogMessage(java.util.Collection<java.lang.Long> itemIds, java.lang.Integer logLevel, java.lang.String pattern)Select item IDs which log's level is greater than or equal to provided and log's message match to the REGEX patternjava.util.List<java.lang.Long>selectIdsByStringLogMessage(java.util.Collection<java.lang.Long> itemIds, java.lang.Integer logLevel, java.lang.String pattern)Select item IDs which log's level is greater than or equal to provided and log's message match to 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>selectIdsUnderByRegexLogMessage(java.lang.Long launchId, java.util.Collection<java.lang.Long> itemIds, java.lang.Integer logLevel, java.lang.String pattern)Select item IDs which descendants' log's level is greater than or equal to provided and log's message match to the REGEX patternjava.util.List<java.lang.Long>selectIdsUnderByStringLogMessage(java.lang.Long launchId, java.util.Collection<java.lang.Long> itemIds, java.lang.Integer logLevel, java.lang.String pattern)Select item IDs which descendants' log's level is greater than or equal to provided and log's message match to the REGEX patternjava.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 itemId, StatusEnum... statuses)Select common items object that have provided status for specified parent item.java.util.Optional<org.springframework.data.util.Pair<java.lang.Long,java.lang.String>>selectPath(java.lang.String uuid)Select id and path for item by uuidjava.util.Map<java.lang.Long,PathName>selectPathNames(java.util.Collection<TestItem> testItems)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)voidsetDsl(org.jooq.DSLContext dsl)intupdateStatusAndEndTimeById(java.lang.Long itemId, JStatusEnum status, java.time.LocalDateTime endTime)intupdateStatusAndEndTimeByRetryOfId(java.lang.Long retryOfId, JStatusEnum from, JStatusEnum to, java.time.LocalDateTime endTime)
-
-
-
Method Detail
-
setDsl
@Autowired public void setDsl(org.jooq.DSLContext dsl)
-
accumulateStatisticsByFilter
public java.util.Set<Statistics> accumulateStatisticsByFilter(Queryable filter)
Description copied from interface:TestItemRepositoryCustomGets accumulated statistics of items queried by provided filter- Specified by:
accumulateStatisticsByFilterin interfaceTestItemRepositoryCustom- Parameters:
filter-QueryablewithFilterTarget.TEST_ITEM_TARGET- Returns:
- Set of accumulated statistics;
-
accumulateStatisticsByFilterNotFromBaseline
public java.util.Set<Statistics> accumulateStatisticsByFilterNotFromBaseline(Queryable targetFilter, Queryable baselineFilter)
- Specified by:
accumulateStatisticsByFilterNotFromBaselinein interfaceTestItemRepositoryCustom
-
findIdByFilter
public java.util.Optional<java.lang.Long> findIdByFilter(Queryable filter, org.springframework.data.domain.Sort sort)
- Specified by:
findIdByFilterin interfaceTestItemRepositoryCustom
-
findByFilter
public 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)
Description copied from interface:TestItemRepositoryCustomExecutes query built for given filters and maps result for given page- Specified by:
findByFilterin interfaceTestItemRepositoryCustom- Parameters:
isLatest- Flag for retrieving only latest launcheslaunchFilter-QueryablewithFilterTarget.LAUNCH_TARGETtestItemFilter-QueryablewithFilterTarget.TEST_ITEM_TARGETlaunchPageable-PageableforLaunchquerytestItemPageable-PageableforTestItemquery- Returns:
- List of mapped entries found
-
findAllNotFromBaseline
public org.springframework.data.domain.Page<TestItem> findAllNotFromBaseline(Queryable targetFilter, Queryable baselineFilter, org.springframework.data.domain.Pageable pageable)
- Specified by:
findAllNotFromBaselinein interfaceTestItemRepositoryCustom
-
loadItemsHistoryPage
public org.springframework.data.domain.Page<TestItemHistory> loadItemsHistoryPage(Queryable filter, org.springframework.data.domain.Pageable pageable, java.lang.Long projectId, int historyDepth, boolean usingHash)
Description copied from interface:TestItemRepositoryCustomLoads itemsTestItemHistory-TestItemexecutions from the wholeProjectgrouped byTestItem.getTestCaseHash()and ordered byTestItem.getStartTime()`DESCENDING` within group. Max group size equals to the provided `historyDepth` value.- Specified by:
loadItemsHistoryPagein interfaceTestItemRepositoryCustom- Parameters:
filter-Queryablepageable-PageableprojectId-Project.getId()historyDepth- maxTestItemHistorygroup size- Returns:
PagewithTestItemHistoryas content
-
loadItemsHistoryPage
public 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)
Description copied from interface:TestItemRepositoryCustomLoads 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.- Specified by:
loadItemsHistoryPagein interfaceTestItemRepositoryCustom- Parameters:
filter-Queryablepageable-PageableprojectId-Project.getId()launchName- Name of theLaunchwhichTestItemshould be retrievedhistoryDepth- MaxTestItemHistorygroup size- Returns:
PagewithTestItemHistoryas content
-
loadItemsHistoryPage
public 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)
Description copied from interface:TestItemRepositoryCustomLoads 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.- Specified by:
loadItemsHistoryPagein interfaceTestItemRepositoryCustom- Parameters:
filter-Queryablepageable-PageableprojectId-Project.getId()launchIds- IDs of theLaunches whichTestItemshould be retrievedhistoryDepth- MaxTestItemHistorygroup size- Returns:
PagewithTestItemHistoryas content
-
loadItemsHistoryPage
public 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)
Description copied from interface:TestItemRepositoryCustomLoads 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- Specified by:
loadItemsHistoryPagein interfaceTestItemRepositoryCustom- Parameters:
isLatest- Flag for retrieving only latest launcheslaunchFilter-QueryableforLaunchquerytestItemFilter-QueryableforTestItemquerylaunchPageable-PageableforLaunchquerytestItemPageable-PageableforTestItemqueryprojectId-Project.getId()historyDepth- MaxTestItemHistorygroup size- Returns:
PagewithTestItemHistoryas content
-
loadItemsHistoryPage
public 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)
Description copied from interface:TestItemRepositoryCustomLoads 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- Specified by:
loadItemsHistoryPagein interfaceTestItemRepositoryCustom- 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
public java.util.List<TestItem> selectAllDescendants(java.lang.Long itemId)
Description copied from interface:TestItemRepositoryCustomSelects all descendants of TestItem with provided id.- Specified by:
selectAllDescendantsin interfaceTestItemRepositoryCustom- Parameters:
itemId- TestItem id- Returns:
- List of all descendants
-
selectAllDescendantsWithChildren
public java.util.List<TestItem> selectAllDescendantsWithChildren(java.lang.Long itemId)
Description copied from interface:TestItemRepositoryCustomSelects all descendants of TestItem with provided id, which has at least one child.- Specified by:
selectAllDescendantsWithChildrenin interfaceTestItemRepositoryCustom- Parameters:
itemId- TestItem id- Returns:
- List of descendants
-
findTestItemIdsByLaunchId
public java.util.List<java.lang.Long> findTestItemIdsByLaunchId(java.lang.Long launchId, org.springframework.data.domain.Pageable pageable)- Specified by:
findTestItemIdsByLaunchIdin interfaceTestItemRepositoryCustom
-
selectItemsInStatusByLaunch
public java.util.List<TestItem> selectItemsInStatusByLaunch(java.lang.Long launchId, StatusEnum... statuses)
Description copied from interface:TestItemRepositoryCustomSelect common items object that have provided status for specified launch.- Specified by:
selectItemsInStatusByLaunchin interfaceTestItemRepositoryCustom- Parameters:
launchId- Launchstatuses- Statuses- Returns:
- List of items
-
selectItemsInStatusByParent
public java.util.List<TestItem> selectItemsInStatusByParent(java.lang.Long itemId, StatusEnum... statuses)
Description copied from interface:TestItemRepositoryCustomSelect common items object that have provided status for specified parent item.- Specified by:
selectItemsInStatusByParentin interfaceTestItemRepositoryCustom- Parameters:
itemId- Parent itemstatuses- Statuses- Returns:
- List of items
-
hasItemsInStatusByLaunch
public java.lang.Boolean hasItemsInStatusByLaunch(java.lang.Long launchId, StatusEnum... statuses)Description copied from interface:TestItemRepositoryCustomTrue if the provided launch contains any items with a specified status.- Specified by:
hasItemsInStatusByLaunchin interfaceTestItemRepositoryCustom- Parameters:
launchId- Checking launch idstatuses- Checking statuses- Returns:
- True if contains, false if not
-
findAllNotInIssueByLaunch
public java.util.List<TestItem> findAllNotInIssueByLaunch(java.lang.Long launchId, java.lang.String locator)
Description copied from interface:TestItemRepositoryCustomSelect items that has different issue from provided for specified launch.- Specified by:
findAllNotInIssueByLaunchin interfaceTestItemRepositoryCustom- Parameters:
launchId- Launchlocator- Issue type locator- Returns:
- List of items
-
selectIdsNotInIssueByLaunch
public java.util.List<java.lang.Long> selectIdsNotInIssueByLaunch(java.lang.Long launchId, java.lang.String locator)Description copied from interface:TestItemRepositoryCustomSelect items that has different issue from provided for specified launch.- Specified by:
selectIdsNotInIssueByLaunchin interfaceTestItemRepositoryCustom- Parameters:
launchId- Launchlocator- Issue type locator- Returns:
- List of items
-
findAllNotInIssueGroupByLaunch
public java.util.List<TestItem> findAllNotInIssueGroupByLaunch(java.lang.Long launchId, TestItemIssueGroup issueGroup)
- Specified by:
findAllNotInIssueGroupByLaunchin interfaceTestItemRepositoryCustom
-
selectIdsNotInIssueGroupByLaunch
public java.util.List<java.lang.Long> selectIdsNotInIssueGroupByLaunch(java.lang.Long launchId, TestItemIssueGroup issueGroup)- Specified by:
selectIdsNotInIssueGroupByLaunchin interfaceTestItemRepositoryCustom
-
findAllInIssueGroupByLaunch
public java.util.List<TestItem> findAllInIssueGroupByLaunch(java.lang.Long launchId, TestItemIssueGroup issueGroup)
- Specified by:
findAllInIssueGroupByLaunchin interfaceTestItemRepositoryCustom
-
selectIdsWithIssueByLaunch
public java.util.List<java.lang.Long> selectIdsWithIssueByLaunch(java.lang.Long launchId)
Description copied from interface:TestItemRepositoryCustomSelect allTestItem.getItemId()ofTestItemwith attachedIssueandTestItem.getLaunchId()equal to provided `launchId`- Specified by:
selectIdsWithIssueByLaunchin interfaceTestItemRepositoryCustom- Parameters:
launchId-TestItem.getLaunchId()- Returns:
ListofTestItem.getItemId()
-
hasItemsInStatusAddedLately
public java.lang.Boolean hasItemsInStatusAddedLately(java.lang.Long launchId, java.time.Duration period, StatusEnum... statuses)Description copied from interface:TestItemRepositoryCustomTrue if theTestItemwith matching 'status' and 'launchId' was started within the provided 'period'- Specified by:
hasItemsInStatusAddedLatelyin interfaceTestItemRepositoryCustom- Parameters:
launchId-Launch.idperiod-Durationstatuses-StatusEnum- Returns:
- true if items(the item) exist(exists)
-
hasLogs
public java.lang.Boolean hasLogs(java.lang.Long launchId, java.time.Duration period, StatusEnum... statuses)Description copied from interface:TestItemRepositoryCustomTrue ifTestItemwasn't modified before the provided 'period' and has logs- Specified by:
hasLogsin interfaceTestItemRepositoryCustom- Parameters:
launchId-Launch.idperiod-Durationstatuses-StatusEnum- Returns:
- true if
TestItemwasn't modified before the provided 'period' and has logs
-
selectItemsInIssueByLaunch
public java.util.List<TestItem> selectItemsInIssueByLaunch(java.lang.Long launchId, java.lang.String issueType)
Description copied from interface:TestItemRepositoryCustomSelect test items that has issue with provided issue type for specified launch.- Specified by:
selectItemsInIssueByLaunchin interfaceTestItemRepositoryCustom- Parameters:
launchId- Launch idissueType- Issue type- Returns:
- List of items
-
selectRetries
public java.util.List<TestItem> selectRetries(java.util.List<java.lang.Long> retryOfIds)
- Specified by:
selectRetriesin interfaceTestItemRepositoryCustom
-
selectIssueLocatorsByProject
public java.util.List<IssueType> selectIssueLocatorsByProject(java.lang.Long projectId)
- Specified by:
selectIssueLocatorsByProjectin interfaceTestItemRepositoryCustom
-
selectIssueTypeByLocator
public java.util.Optional<IssueType> selectIssueTypeByLocator(java.lang.Long projectId, java.lang.String locator)
Description copied from interface:TestItemRepositoryCustomSelects issue type object by provided locator for specified project.- Specified by:
selectIssueTypeByLocatorin interfaceTestItemRepositoryCustom- Parameters:
projectId- Project idlocator- Issue type locator- Returns:
- Issue type
-
selectPath
public java.util.Optional<org.springframework.data.util.Pair<java.lang.Long,java.lang.String>> selectPath(java.lang.String uuid)
Description copied from interface:TestItemRepositoryCustomSelect id and path for item by uuid- Specified by:
selectPathin interfaceTestItemRepositoryCustom- Parameters:
uuid-TestItem.getUuid()()}- Returns:
- id from collection ->
PathName
-
selectIdsByAnalyzedWithLevelGte
public java.util.List<java.lang.Long> selectIdsByAnalyzedWithLevelGte(boolean autoAnalyzed, boolean ignoreAnalyzer, java.lang.Long launchId, int logLevel)Logentities are searched from the whole tree underTestItemthat matched to the provided `launchId` and `autoAnalyzed` conditions- Specified by:
selectIdsByAnalyzedWithLevelGtein interfaceTestItemRepositoryCustom- Parameters:
autoAnalyzed-Issue.getAutoAnalyzed()launchId-TestItem.getLaunchId()logLevel-Log.getLogLevel()- Returns:
- The
Listof theTestItem.getItemId()
-
updateStatusAndEndTimeById
public int updateStatusAndEndTimeById(java.lang.Long itemId, JStatusEnum status, java.time.LocalDateTime endTime)- Specified by:
updateStatusAndEndTimeByIdin interfaceTestItemRepositoryCustom- Parameters:
itemId-TestItem.itemIdstatus- New statusendTime-TestItemResults.endTime- Returns:
- 1 if updated, otherwise 0
-
updateStatusAndEndTimeByRetryOfId
public int updateStatusAndEndTimeByRetryOfId(java.lang.Long retryOfId, JStatusEnum from, JStatusEnum to, java.time.LocalDateTime endTime)- Specified by:
updateStatusAndEndTimeByRetryOfIdin interfaceTestItemRepositoryCustom- Parameters:
retryOfId-TestItem.getRetryOf()from- Previous itemTestItemResults.getStatus()criteria to updateto- NewTestItemResults.getStatus()endTime- NewTestItemResults.getEndTime()- Returns:
- amount of updated items
-
getTypeByItemId
public TestItemTypeEnum getTypeByItemId(java.lang.Long itemId)
- Specified by:
getTypeByItemIdin interfaceTestItemRepositoryCustom- Parameters:
itemId-TestItem.itemId- Returns:
TestItemTypeEnum
-
selectIdsByFilter
public java.util.List<java.lang.Long> selectIdsByFilter(java.lang.Long launchId, Queryable filter, int limit, int offset)- Specified by:
selectIdsByFilterin interfaceTestItemRepositoryCustom- Parameters:
launchId-TestItem.getLaunchId()filter-Queryablefor additional dynamic filteringlimit- query limitoffset- query offset- Returns:
ListofTestItem.getItemId()
-
selectIdsByHasDescendants
public java.util.List<java.lang.Long> selectIdsByHasDescendants(java.util.Collection<java.lang.Long> itemIds)
Description copied from interface:TestItemRepositoryCustomSelect ids of items that has descendants- Specified by:
selectIdsByHasDescendantsin interfaceTestItemRepositoryCustom- Parameters:
itemIds-CollectionofTestItem.getItemId()that should be filtered by having descendants- Returns:
ListofTestItem.getItemId()
-
selectIdsByStringLogMessage
public java.util.List<java.lang.Long> selectIdsByStringLogMessage(java.util.Collection<java.lang.Long> itemIds, java.lang.Integer logLevel, java.lang.String pattern)Description copied from interface:TestItemRepositoryCustomSelect item IDs which log's level is greater than or equal to provided and log's message match to the STRING pattern- Specified by:
selectIdsByStringLogMessagein interfaceTestItemRepositoryCustom- Parameters:
itemIds-CollectionofTestItem.getItemId()which logs should matchlogLevel-Log.getLogLevel()pattern- CASE SENSITIVE STRING pattern for log message search- Returns:
- The
Listof theTestItem.getItemId()
-
selectIdsByRegexLogMessage
public java.util.List<java.lang.Long> selectIdsByRegexLogMessage(java.util.Collection<java.lang.Long> itemIds, java.lang.Integer logLevel, java.lang.String pattern)Description copied from interface:TestItemRepositoryCustomSelect item IDs which log's level is greater than or equal to provided and log's message match to the REGEX pattern- Specified by:
selectIdsByRegexLogMessagein interfaceTestItemRepositoryCustom- Parameters:
itemIds-CollectionofTestItem.getItemId()which logs should matchlogLevel-Log.getLogLevel()pattern- REGEX pattern for log message search- Returns:
- The
Listof theTestItem.getItemId()
-
selectIdsUnderByStringLogMessage
public java.util.List<java.lang.Long> selectIdsUnderByStringLogMessage(java.lang.Long launchId, java.util.Collection<java.lang.Long> itemIds, java.lang.Integer logLevel, java.lang.String pattern)Description copied from interface:TestItemRepositoryCustomSelect item IDs which descendants' log's level is greater than or equal to provided and log's message match to the REGEX pattern- Specified by:
selectIdsUnderByStringLogMessagein interfaceTestItemRepositoryCustom- Parameters:
launchId-TestItem.getLaunchId()itemIds-CollectionofTestItem.getItemId()which logs should matchlogLevel-Log.getLogLevel()pattern- REGEX pattern for log message search- Returns:
- The
Listof theTestItem.getItemId()
-
selectIdsUnderByRegexLogMessage
public java.util.List<java.lang.Long> selectIdsUnderByRegexLogMessage(java.lang.Long launchId, java.util.Collection<java.lang.Long> itemIds, java.lang.Integer logLevel, java.lang.String pattern)Description copied from interface:TestItemRepositoryCustomSelect item IDs which descendants' log's level is greater than or equal to provided and log's message match to the REGEX pattern- Specified by:
selectIdsUnderByRegexLogMessagein interfaceTestItemRepositoryCustom- Parameters:
launchId-TestItem.getLaunchId()itemIds-CollectionofTestItem.getItemId()which logs should matchlogLevel-Log.getLogLevel()pattern- REGEX pattern for log message search- Returns:
- The
Listof theTestItem.getItemId()
-
findByFilter
public java.util.List<TestItem> findByFilter(Queryable filter)
Description copied from interface:FilterableRepositoryExecutes query built for given filter- Specified by:
findByFilterin interfaceFilterableRepository<TestItem>- Parameters:
filter- Filter to build a query- Returns:
- List of mapped entries found
-
findByFilter
public org.springframework.data.domain.Page<TestItem> findByFilter(Queryable filter, org.springframework.data.domain.Pageable pageable)
Description copied from interface:FilterableRepositoryExecutes query built for given filter and maps result for given page- Specified by:
findByFilterin interfaceFilterableRepository<TestItem>- Parameters:
filter- Filter to build a querypageable-Pageable- Returns:
- List of mapped entries found
-
findAllNestedStepsByIds
public java.util.List<NestedStep> findAllNestedStepsByIds(java.util.Collection<java.lang.Long> ids, Queryable logFilter, boolean excludePassedLogs)
Description copied from interface:TestItemRepositoryCustomSelectNestedStepentities 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- Specified by:
findAllNestedStepsByIdsin interfaceTestItemRepositoryCustom- Parameters:
ids-Collectionof theTestItem.itemIdlogFilter-QueryablewithLogtarget, to evaluate 'hasContent' flag and attachments count- Returns:
Listof theNestedStep
-
findIndexTestItemByLaunchId
public java.util.List<com.epam.ta.reportportal.ws.model.analyzer.IndexTestItem> findIndexTestItemByLaunchId(java.lang.Long launchId, java.util.Collection<JTestItemTypeEnum> itemTypes)- Specified by:
findIndexTestItemByLaunchIdin interfaceTestItemRepositoryCustom
-
selectPathNames
public java.util.Map<java.lang.Long,PathName> selectPathNames(java.util.Collection<TestItem> testItems)
Description copied from interface:TestItemRepositoryCustomSelectPathNamecontaining ids and names of all items in a tree till current and launch name and number for each item id from the provided collection- Specified by:
selectPathNamesin interfaceTestItemRepositoryCustom- Parameters:
testItems-CollectionofTestItem- Returns:
- Map
-
-