Interface TestItemRepositoryCustom

    • Method Detail

      • accumulateStatisticsByFilterNotFromBaseline

        java.util.Set<Statistics> accumulateStatisticsByFilterNotFromBaseline​(Queryable targetFilter,
                                                                              Queryable baselineFilter)
      • findIdByFilter

        java.util.Optional<java.lang.Long> findIdByFilter​(Queryable filter,
                                                          org.springframework.data.domain.Sort sort)
      • 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 launches
        launchFilter - Queryable with FilterTarget.LAUNCH_TARGET
        testItemFilter - Queryable with FilterTarget.TEST_ITEM_TARGET
        launchPageable - Pageable for Launch query
        testItemPageable - Pageable for TestItem query
        Returns:
        List of mapped entries found
      • findAllNotFromBaseline

        org.springframework.data.domain.Page<TestItem> findAllNotFromBaseline​(Queryable targetFilter,
                                                                              Queryable baselineFilter,
                                                                              org.springframework.data.domain.Pageable pageable)
      • 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
      • findTestItemIdsByLaunchId

        java.util.List<java.lang.Long> findTestItemIdsByLaunchId​(@Param("launchId")
                                                                 java.lang.Long launchId,
                                                                 org.springframework.data.domain.Pageable pageable)
      • 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 - Launch
        statuses - 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 item
        statuses - 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 id
        statuses - 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 - Launch
        locator - 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 - Launch
        locator - 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)
      • hasItemsInStatusAddedLately

        java.lang.Boolean hasItemsInStatusAddedLately​(java.lang.Long launchId,
                                                      java.time.Duration period,
                                                      StatusEnum... statuses)
        True if the TestItem with matching 'status' and 'launchId' was started within the provided 'period'
        Parameters:
        period - Duration
        launchId - Launch.id
        statuses - 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 if TestItem wasn't modified before the provided 'period' and has logs
        Parameters:
        launchId - Launch.id
        period - Duration
        statuses - StatusEnum
        Returns:
        true if TestItem wasn'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 id
        issueType - 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 id
        locator - Issue type locator
        Returns:
        Issue type
      • selectPath

        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 uuid
        Parameters:
        uuid - TestItem.getUuid() ()}
        Returns:
        id from collection -> PathName
      • selectPathNames

        java.util.Map<java.lang.Long,​PathName> selectPathNames​(java.util.Collection<TestItem> testItems)
        Select PathName containing 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:
        testItems - Collection of TestItem
        Returns:
        testItemId from collection -> PathName
      • updateStatusAndEndTimeById

        int updateStatusAndEndTimeById​(java.lang.Long itemId,
                                       JStatusEnum status,
                                       java.time.LocalDateTime endTime)
        Parameters:
        itemId - TestItem.itemId
        status - New status
        endTime - TestItemResults.endTime
        Returns:
        1 if updated, otherwise 0
      • selectIdsByFilter

        java.util.List<java.lang.Long> selectIdsByFilter​(java.lang.Long launchId,
                                                         Queryable filter,
                                                         int limit,
                                                         int offset)
        Parameters:
        launchId - TestItem.getLaunchId()
        filter - Queryable for additional dynamic filtering
        limit - query limit
        offset - query offset
        Returns:
        List of TestItem.getItemId()
      • selectIdsByHasDescendants

        java.util.List<java.lang.Long> selectIdsByHasDescendants​(java.util.Collection<java.lang.Long> itemIds)
        Select ids of items that has descendants
        Parameters:
        itemIds - Collection of TestItem.getItemId() that should be filtered by having descendants
        Returns:
        List of TestItem.getItemId()
      • selectIdsByStringLogMessage

        java.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 pattern
        Parameters:
        itemIds - Collection of TestItem.getItemId() which logs should match
        logLevel - Log.getLogLevel()
        pattern - CASE SENSITIVE STRING pattern for log message search
        Returns:
        The List of the TestItem.getItemId()
      • selectIdsByRegexLogMessage

        java.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 pattern
        Parameters:
        itemIds - Collection of TestItem.getItemId() which logs should match
        logLevel - Log.getLogLevel()
        pattern - REGEX pattern for log message search
        Returns:
        The List of the TestItem.getItemId()
      • selectIdsUnderByStringLogMessage

        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)
        Select item IDs which descendants' log's level is greater than or equal to provided and log's message match to the REGEX pattern
        Parameters:
        launchId - TestItem.getLaunchId()
        itemIds - Collection of TestItem.getItemId() which logs should match
        logLevel - Log.getLogLevel()
        pattern - REGEX pattern for log message search
        Returns:
        The List of the TestItem.getItemId()
      • selectIdsUnderByRegexLogMessage

        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 pattern
        Parameters:
        launchId - TestItem.getLaunchId()
        itemIds - Collection of TestItem.getItemId() which logs should match
        logLevel - Log.getLogLevel()
        pattern - REGEX pattern for log message search
        Returns:
        The List of the TestItem.getItemId()
      • findIndexTestItemByLaunchId

        java.util.List<com.epam.ta.reportportal.ws.model.analyzer.IndexTestItem> findIndexTestItemByLaunchId​(java.lang.Long launchId,
                                                                                                             java.util.Collection<JTestItemTypeEnum> itemTypes)