Package com.epam.ta.reportportal.dao
Class LaunchRepositoryCustomImpl
- java.lang.Object
-
- com.epam.ta.reportportal.dao.LaunchRepositoryCustomImpl
-
- All Implemented Interfaces:
FilterableRepository<Launch>,LaunchRepositoryCustom
@Repository public class LaunchRepositoryCustomImpl extends java.lang.Object implements LaunchRepositoryCustom
-
-
Constructor Summary
Constructors Constructor Description LaunchRepositoryCustomImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegercountLaunches(java.lang.Long projectId, java.lang.String mode)Counts launches with mode for specified projectjava.lang.IntegercountLaunches(java.lang.Long projectId, java.lang.String mode, java.time.LocalDateTime from)Counts launches with mode for specified project from provided datejava.util.Map<java.lang.String,java.lang.Integer>countLaunchesGroupedByOwner(java.lang.Long projectId, java.lang.String mode, java.time.LocalDateTime from)Counts quantity of launches with mode per user for specified project.org.springframework.data.domain.Page<Launch>findAllLatestByFilter(Filter filter, org.springframework.data.domain.Pageable pageable)java.util.List<Launch>findByFilter(Queryable filter)Executes query built for given filterorg.springframework.data.domain.Page<Launch>findByFilter(Queryable filter, org.springframework.data.domain.Pageable pageable)Executes query built for given filter and maps result for given pagejava.util.Optional<Launch>findLastRun(java.lang.Long projectId, java.lang.String mode)Finds the last valid launch in projectjava.util.Optional<Launch>findLatestByFilter(Filter filter)java.util.List<java.lang.Long>findLaunchIdsByProjectId(java.lang.Long projectId)Finds launch ids of project with provided idjava.util.List<java.lang.String>getLaunchNamesByModeExcludedByStatus(java.lang.Long projectId, java.lang.String value, LaunchModeEnum mode, StatusEnum status)Retrieves names of the launches by provided 'projectId', 'mode', 'value' as a part of the name and statuses that are not equal to the provided 'status'java.util.List<java.lang.String>getOwnerNames(java.lang.Long projectId, java.lang.String value, java.lang.String mode)java.util.Map<java.lang.String,java.lang.String>getStatuses(java.lang.Long projectId, java.lang.Long[] ids)booleanhasItemsInStatuses(java.lang.Long launchId, java.util.List<JStatusEnum> statuses)
-
-
-
Method Detail
-
hasItemsInStatuses
public boolean hasItemsInStatuses(java.lang.Long launchId, java.util.List<JStatusEnum> statuses)- Specified by:
hasItemsInStatusesin interfaceLaunchRepositoryCustom
-
findByFilter
public java.util.List<Launch> findByFilter(Queryable filter)
Description copied from interface:FilterableRepositoryExecutes query built for given filter- Specified by:
findByFilterin interfaceFilterableRepository<Launch>- Parameters:
filter- Filter to build a query- Returns:
- List of mapped entries found
-
findByFilter
public org.springframework.data.domain.Page<Launch> 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<Launch>- Parameters:
filter- Filter to build a querypageable-Pageable- Returns:
- List of mapped entries found
-
getLaunchNamesByModeExcludedByStatus
public java.util.List<java.lang.String> getLaunchNamesByModeExcludedByStatus(java.lang.Long projectId, java.lang.String value, LaunchModeEnum mode, StatusEnum status)Description copied from interface:LaunchRepositoryCustomRetrieves names of the launches by provided 'projectId', 'mode', 'value' as a part of the name and statuses that are not equal to the provided 'status'- Specified by:
getLaunchNamesByModeExcludedByStatusin interfaceLaunchRepositoryCustom- Parameters:
projectId-Launch.projectIdvalue- A part of theLaunch.namemode-Launch.modestatus-Launch.status- Returns:
- The
Listof theLaunch.name
-
getOwnerNames
public java.util.List<java.lang.String> getOwnerNames(java.lang.Long projectId, java.lang.String value, java.lang.String mode)- Specified by:
getOwnerNamesin interfaceLaunchRepositoryCustom
-
getStatuses
public java.util.Map<java.lang.String,java.lang.String> getStatuses(java.lang.Long projectId, java.lang.Long[] ids)- Specified by:
getStatusesin interfaceLaunchRepositoryCustom
-
findLatestByFilter
public java.util.Optional<Launch> findLatestByFilter(Filter filter)
- Specified by:
findLatestByFilterin interfaceLaunchRepositoryCustom
-
findAllLatestByFilter
public org.springframework.data.domain.Page<Launch> findAllLatestByFilter(Filter filter, org.springframework.data.domain.Pageable pageable)
- Specified by:
findAllLatestByFilterin interfaceLaunchRepositoryCustom
-
findLaunchIdsByProjectId
public java.util.List<java.lang.Long> findLaunchIdsByProjectId(java.lang.Long projectId)
Description copied from interface:LaunchRepositoryCustomFinds launch ids of project with provided id- Specified by:
findLaunchIdsByProjectIdin interfaceLaunchRepositoryCustom- Parameters:
projectId- - Project id- Returns:
- List of ids
-
findLastRun
public java.util.Optional<Launch> findLastRun(java.lang.Long projectId, java.lang.String mode)
Description copied from interface:LaunchRepositoryCustomFinds the last valid launch in project- Specified by:
findLastRunin interfaceLaunchRepositoryCustom- Parameters:
projectId- Project idmode- Launch mode- Returns:
OptionalofLaunch
-
countLaunches
public java.lang.Integer countLaunches(java.lang.Long projectId, java.lang.String mode, java.time.LocalDateTime from)Description copied from interface:LaunchRepositoryCustomCounts launches with mode for specified project from provided date- Specified by:
countLaunchesin interfaceLaunchRepositoryCustom- Parameters:
projectId- Project idmode- Launch modefrom- From Date to count- Returns:
- Launches count
-
countLaunches
public java.lang.Integer countLaunches(java.lang.Long projectId, java.lang.String mode)Description copied from interface:LaunchRepositoryCustomCounts launches with mode for specified project- Specified by:
countLaunchesin interfaceLaunchRepositoryCustom- Parameters:
projectId-Launch.projectIdmode-Launch.mode- Returns:
- Launches count
-
countLaunchesGroupedByOwner
public java.util.Map<java.lang.String,java.lang.Integer> countLaunchesGroupedByOwner(java.lang.Long projectId, java.lang.String mode, java.time.LocalDateTime from)Description copied from interface:LaunchRepositoryCustomCounts quantity of launches with mode per user for specified project.- Specified by:
countLaunchesGroupedByOwnerin interfaceLaunchRepositoryCustom- Parameters:
projectId- Project idmode- Launch modefrom- From Date to count- Returns:
- Map of username and launches count
-
-