diff --git a/project-properties.gradle b/project-properties.gradle index 47f31fb52..31779ce86 100755 --- a/project-properties.gradle +++ b/project-properties.gradle @@ -7,7 +7,7 @@ project.ext { releaseMode = project.hasProperty("releaseMode") ? project.releaseMode.toBoolean() : false hasDBSchema = project.hasProperty("DB_SCHEMA_POSTGRES") scriptsUrl = commonScriptsUrl + (releaseMode ? getProperty('scripts.version') : 'develop') - migrationsUrl = migrationsScriptsUrl + (releaseMode ? getProperty('migrations.version') : 'feature/EPMRPP-migrate-tms-to-develop') + migrationsUrl = migrationsScriptsUrl + (releaseMode ? getProperty('migrations.version') : 'feature/EPMRPP-manual-launches-to-migrate-tms-to-develop') //TODO refactor with archive download testScriptsSrc = [ diff --git a/src/main/java/com/epam/ta/reportportal/commons/querygen/FilterTarget.java b/src/main/java/com/epam/ta/reportportal/commons/querygen/FilterTarget.java index bfd697978..d48995283 100644 --- a/src/main/java/com/epam/ta/reportportal/commons/querygen/FilterTarget.java +++ b/src/main/java/com/epam/ta/reportportal/commons/querygen/FilterTarget.java @@ -143,6 +143,12 @@ import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestCaseCriteriaConstant.CRITERIA_TMS_TEST_CASE_PROJECT_ID; import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestCaseCriteriaConstant.CRITERIA_TMS_TEST_CASE_SEARCH; import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestCaseCriteriaConstant.CRITERIA_TMS_TEST_CASE_UPDATED_AT; +import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestCaseExecutionCriteriaConstant.CRITERIA_TMS_TEST_CASE_EXECUTION_ID; +import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestCaseExecutionCriteriaConstant.CRITERIA_TMS_TEST_CASE_EXECUTION_LAUNCH_ID; +import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestCaseExecutionCriteriaConstant.CRITERIA_TMS_TEST_CASE_EXECUTION_STATUS; +import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestCaseExecutionCriteriaConstant.CRITERIA_TMS_TEST_CASE_EXECUTION_TEST_CASE_ID; +import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestCaseExecutionCriteriaConstant.CRITERIA_TMS_TEST_CASE_EXECUTION_TEST_CASE_VERSION_ID; +import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestCaseExecutionCriteriaConstant.CRITERIA_TMS_TEST_CASE_EXECUTION_TEST_ITEM_ID; import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestFolderCriteriaConstant.CRITERIA_TMS_TEST_FOLDER_DESCRIPTION; import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestFolderCriteriaConstant.CRITERIA_TMS_TEST_FOLDER_ID; import static com.epam.ta.reportportal.commons.querygen.constant.tms.TmsTestFolderCriteriaConstant.CRITERIA_TMS_TEST_FOLDER_NAME; @@ -202,6 +208,7 @@ import static com.epam.ta.reportportal.jooq.Tables.USERS; import static com.epam.ta.reportportal.jooq.Tables.WIDGET; import static com.epam.ta.reportportal.jooq.tables.JOwnedEntity.OWNED_ENTITY; +import static com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION; import static org.jooq.impl.DSL.choose; import static org.jooq.impl.DSL.coalesce; import static org.jooq.impl.DSL.field; @@ -224,6 +231,7 @@ import com.epam.ta.reportportal.entity.project.ProjectProfile; import com.epam.ta.reportportal.entity.tms.TmsAttribute; import com.epam.ta.reportportal.entity.tms.TmsTestCase; +import com.epam.ta.reportportal.entity.tms.TmsTestCaseExecution; import com.epam.ta.reportportal.entity.tms.TmsTestFolder; import com.epam.ta.reportportal.entity.tms.TmsTestPlan; import com.epam.ta.reportportal.entity.user.User; @@ -1961,6 +1969,58 @@ protected void joinTables(QuerySupplier query) { protected Field idField() { return TMS_ATTRIBUTE.ID; } + }, + + TMS_TEST_CASE_EXECUTION_TARGET(TmsTestCaseExecution.class, + Arrays.asList( + new CriteriaHolderBuilder().newBuilder(CRITERIA_TMS_TEST_CASE_EXECUTION_ID, + TMS_TEST_CASE_EXECUTION.ID, Long.class).get(), + new CriteriaHolderBuilder().newBuilder(CRITERIA_TMS_TEST_CASE_EXECUTION_TEST_ITEM_ID, + TMS_TEST_CASE_EXECUTION.TEST_ITEM_ID, Long.class).get(), + new CriteriaHolderBuilder().newBuilder(CRITERIA_TMS_TEST_CASE_EXECUTION_TEST_CASE_ID, + TMS_TEST_CASE_EXECUTION.TEST_CASE_ID, Long.class).get(), + new CriteriaHolderBuilder().newBuilder(CRITERIA_TMS_TEST_CASE_EXECUTION_LAUNCH_ID, + TMS_TEST_CASE_EXECUTION.LAUNCH_ID, Long.class).get(), + new CriteriaHolderBuilder().newBuilder(CRITERIA_TMS_TEST_CASE_EXECUTION_TEST_CASE_VERSION_ID, + TMS_TEST_CASE_EXECUTION.TEST_CASE_VERSION_ID, Long.class).get(), + new CriteriaHolderBuilder().newBuilder(CRITERIA_TMS_TEST_CASE_EXECUTION_STATUS, + TEST_ITEM_RESULTS.STATUS, + JStatusEnum.class + ).get() + ) + ) { + @Override + protected Collection selectFields() { + return Lists.newArrayList( + TMS_TEST_CASE_EXECUTION.ID, + TMS_TEST_CASE_EXECUTION.TEST_ITEM_ID, + TMS_TEST_CASE_EXECUTION.TEST_CASE_ID, + TMS_TEST_CASE_EXECUTION.LAUNCH_ID, + TMS_TEST_CASE_EXECUTION.TEST_CASE_VERSION_ID, + TMS_TEST_CASE_EXECUTION.TEST_CASE_SNAPSHOT, + TEST_ITEM.START_TIME, + TEST_ITEM_RESULTS.STATUS, + TEST_ITEM_RESULTS.END_TIME + ); + } + + @Override + protected void addFrom(SelectQuery query) { + query.addFrom(TMS_TEST_CASE_EXECUTION); + } + + @Override + protected void joinTables(QuerySupplier query) { + query.addJoin(TEST_ITEM, JoinType.LEFT_OUTER_JOIN, + TMS_TEST_CASE_EXECUTION.TEST_ITEM_ID.eq(TEST_ITEM.ITEM_ID)); + query.addJoin(TEST_ITEM_RESULTS, JoinType.LEFT_OUTER_JOIN, + TEST_ITEM.ITEM_ID.eq(TEST_ITEM_RESULTS.RESULT_ID)); + } + + @Override + protected Field idField() { + return TMS_TEST_CASE_EXECUTION.ID; + } }; public static final String FILTERED_QUERY = "filtered"; diff --git a/src/main/java/com/epam/ta/reportportal/commons/querygen/constant/tms/TmsTestCaseExecutionCriteriaConstant.java b/src/main/java/com/epam/ta/reportportal/commons/querygen/constant/tms/TmsTestCaseExecutionCriteriaConstant.java new file mode 100644 index 000000000..fc0ee42d6 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/commons/querygen/constant/tms/TmsTestCaseExecutionCriteriaConstant.java @@ -0,0 +1,20 @@ +package com.epam.ta.reportportal.commons.querygen.constant.tms; + +/** + * Criteria constants for TMS Test Case Execution filtering. + * + * @author Report Portal Team + */ +public class TmsTestCaseExecutionCriteriaConstant { + + private TmsTestCaseExecutionCriteriaConstant() { + // Hide utility class constructor + } + + public static final String CRITERIA_TMS_TEST_CASE_EXECUTION_ID = "id"; + public static final String CRITERIA_TMS_TEST_CASE_EXECUTION_TEST_ITEM_ID = "testItemId"; + public static final String CRITERIA_TMS_TEST_CASE_EXECUTION_TEST_CASE_ID = "testCaseId"; + public static final String CRITERIA_TMS_TEST_CASE_EXECUTION_LAUNCH_ID = "launchId"; + public static final String CRITERIA_TMS_TEST_CASE_EXECUTION_TEST_CASE_VERSION_ID = "testCaseVersionId"; + public static final String CRITERIA_TMS_TEST_CASE_EXECUTION_STATUS = "status"; +} diff --git a/src/main/java/com/epam/ta/reportportal/dao/LaunchRepository.java b/src/main/java/com/epam/ta/reportportal/dao/LaunchRepository.java index 10a0377c0..6e4c80af3 100644 --- a/src/main/java/com/epam/ta/reportportal/dao/LaunchRepository.java +++ b/src/main/java/com/epam/ta/reportportal/dao/LaunchRepository.java @@ -174,4 +174,22 @@ Optional findLaunchByProjectIdAndNameAndNumberAndIdNotAndModeNot(Long pr String name, Long number, Long launchId, LaunchModeEnum mode); Optional findByIdAndProjectId(@Param("id") Long id, @Param("projectId") Long projectId); + + /** + * Checks if launch exists by ID and project ID. + * + * @param launchId launch ID + * @param projectId project ID + * @return true if launch exists in a project, false otherwise + */ + boolean existsByIdAndProjectId(Long launchId, Long projectId); + + /** + * Finds test plan ID by launch ID. + * + * @param launchId the launch ID + * @return optional test plan ID + */ + @Query("SELECT l.testPlanId FROM Launch l WHERE l.id = :launchId") + Optional findTestPlanIdById(@Param("launchId") Long launchId); } diff --git a/src/main/java/com/epam/ta/reportportal/dao/tms/TmsManualLaunchAttributeRepository.java b/src/main/java/com/epam/ta/reportportal/dao/tms/TmsManualLaunchAttributeRepository.java new file mode 100644 index 000000000..09f1c8f58 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/dao/tms/TmsManualLaunchAttributeRepository.java @@ -0,0 +1,47 @@ +package com.epam.ta.reportportal.dao.tms; + +import com.epam.ta.reportportal.dao.ReportPortalRepository; +import com.epam.ta.reportportal.entity.tms.TmsManualLaunchAttribute; +import com.epam.ta.reportportal.entity.tms.TmsManualLaunchAttributeId; +import java.util.List; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; + +/** + * Repository for {@link TmsManualLaunchAttribute} entity. + */ +public interface TmsManualLaunchAttributeRepository extends + ReportPortalRepository { + + /** + * Finds all attributes by launch ID. + * + * @param launchId launch ID + * @return list of attributes + */ + @Query("SELECT mla FROM TmsManualLaunchAttribute mla WHERE mla.launch.id = :launchId") + List findByLaunchId(@Param("launchId") Long launchId); + + /** + * Deletes all attributes by launch ID. + * + * @param launchId launch ID + */ + @Modifying + @Query("DELETE FROM TmsManualLaunchAttribute mla WHERE mla.launch.id = :launchId") + void deleteByLaunchId(@Param("launchId") Long launchId); + + /** + * Checks if attribute exists for launch. + * + * @param attributeId attribute ID + * @param launchId launch ID + * @return true if exists + */ + @Query("SELECT CASE WHEN COUNT(mla) > 0 THEN true ELSE false END FROM TmsManualLaunchAttribute mla " + + "WHERE mla.attribute.id = :attributeId AND mla.launch.id = :launchId") + boolean existsByAttributeIdAndLaunchId(@Param("attributeId") Long attributeId, + @Param("launchId") Long launchId); +} diff --git a/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestCaseExecutionCommentAttachmentRepository.java b/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestCaseExecutionCommentAttachmentRepository.java new file mode 100644 index 000000000..35c7b1511 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestCaseExecutionCommentAttachmentRepository.java @@ -0,0 +1,59 @@ +package com.epam.ta.reportportal.dao.tms; + +import com.epam.ta.reportportal.dao.ReportPortalRepository; +import com.epam.ta.reportportal.entity.tms.TmsTestCaseExecutionCommentAttachment; +import com.epam.ta.reportportal.entity.tms.TmsTestCaseExecutionCommentAttachmentId; +import java.util.List; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +/** + * Repository interface for managing TMS test case execution comment attachment relationships. + */ +@Repository +public interface TmsTestCaseExecutionCommentAttachmentRepository extends + ReportPortalRepository { + + /** + * Deletes attachment relationships by execution comment ID. + */ + @Modifying + @Query("DELETE FROM TmsTestCaseExecutionCommentAttachment tca WHERE tca.executionComment.id = :executionCommentId") + void deleteByExecutionCommentId(@Param("executionCommentId") Long executionCommentId); + + /** + * Deletes attachment relationships by execution comment IDs. + */ + @Modifying + @Query("DELETE FROM TmsTestCaseExecutionCommentAttachment tca WHERE tca.executionComment.id IN (:executionCommentIds)") + void deleteByExecutionCommentIds(@Param("executionCommentIds") List executionCommentIds); + + /** + * Deletes attachment relationships by execution ID. + */ + @Modifying + @Query("DELETE FROM TmsTestCaseExecutionCommentAttachment tca WHERE tca.executionComment.execution.id = :executionId") + void deleteByExecutionId(@Param("executionId") Long executionId); + + /** + * Deletes attachment relationships by execution IDs. + */ + @Modifying + @Query("DELETE FROM TmsTestCaseExecutionCommentAttachment tca WHERE tca.executionComment.execution.id IN (:executionIds)") + void deleteByExecutionIds(@Param("executionIds") List executionIds); + + /** + * Deletes attachment relationships by launch ID. + */ + @Modifying + @Query("DELETE FROM TmsTestCaseExecutionCommentAttachment tca WHERE tca.executionComment.execution.launchId = :launchId") + void deleteByLaunchId(@Param("launchId") Long launchId); + + /** + * Finds all attachment IDs for TTL management. + */ + @Query("SELECT DISTINCT tca.attachment.id FROM TmsTestCaseExecutionCommentAttachment tca") + List findAllAttachmentIds(); +} diff --git a/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestCaseExecutionCommentRepository.java b/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestCaseExecutionCommentRepository.java new file mode 100644 index 000000000..83557958c --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestCaseExecutionCommentRepository.java @@ -0,0 +1,60 @@ +package com.epam.ta.reportportal.dao.tms; + +import com.epam.ta.reportportal.dao.ReportPortalRepository; +import com.epam.ta.reportportal.entity.tms.TmsTestCaseExecutionComment; +import java.util.List; +import java.util.Optional; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +/** + * Repository interface for managing TMS test case execution comments. + */ +@Repository +public interface TmsTestCaseExecutionCommentRepository extends + ReportPortalRepository { + + /** + * Finds execution comment by execution ID. + */ + Optional findByExecutionId(Long executionId); + + /** + * Finds all execution comments by execution IDs. + */ + List findByExecutionIdIn(List executionIds); + + /** + * Finds all execution comments by launch ID. + */ + @Query("SELECT tec FROM TmsTestCaseExecutionComment tec WHERE tec.execution.launchId = :launchId") + List findByLaunchId(@Param("launchId") Long launchId); + + /** + * Deletes execution comment by execution ID. + */ + @Modifying + @Query("DELETE FROM TmsTestCaseExecutionComment tec WHERE tec.execution.id = :executionId") + void deleteByExecutionId(@Param("executionId") Long executionId); + + /** + * Deletes execution comments by execution IDs. + */ + @Modifying + @Query("DELETE FROM TmsTestCaseExecutionComment tec WHERE tec.execution.id IN (:executionIds)") + void deleteByExecutionIds(@Param("executionIds") List executionIds); + + /** + * Deletes execution comments by launch ID. + */ + @Modifying + @Query("DELETE FROM TmsTestCaseExecutionComment tec WHERE tec.execution.launchId = :launchId") + void deleteByLaunchId(@Param("launchId") Long launchId); + + /** + * Checks if execution comment exists for execution. + */ + boolean existsByExecutionId(Long executionId); +} diff --git a/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestCaseExecutionRepository.java b/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestCaseExecutionRepository.java index 1fd815568..0d47146d9 100644 --- a/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestCaseExecutionRepository.java +++ b/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestCaseExecutionRepository.java @@ -4,6 +4,8 @@ import com.epam.ta.reportportal.entity.tms.TmsTestCaseExecution; import java.util.List; import java.util.Optional; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; @@ -147,7 +149,7 @@ Optional findLastExecutionByTestCaseIdAndTestPlanId( * Finds execution by test case execution ID and launch ID. * * @param testCaseExecutionId test case execution ID - * @param launchId launch ID + * @param launchId launch ID * @return optional execution */ @Query("SELECT e FROM TmsTestCaseExecution e " @@ -280,4 +282,34 @@ List findByLaunchIdAndTestCaseIdIn( ORDER BY ti.startTime ASC """) List findByLaunchIdWithDetails(@Param("launchId") Long launchId); + + /** + * Finds all executions by test case ID and launch ID. + * + * @param testCaseId test case ID + * @param launchId launch ID + * @return list of executions + */ + @Query("SELECT e FROM TmsTestCaseExecution e " + + "WHERE e.testCaseId = :testCaseId " + + "AND e.launchId = :launchId " + + "ORDER BY e.id ASC") + Page findByTestCaseIdAndLaunchId( + @Param("testCaseId") Long testCaseId, + @Param("launchId") Long launchId, + Pageable pageable + ); + + /** + * Checks if execution exists for test case in launch. + * + * @param testCaseExecutionId test case execution ID + * @param launchId launch ID + * @return true if exists + */ + @Query("SELECT CASE WHEN COUNT(e) > 0 THEN true ELSE false END FROM TmsTestCaseExecution e WHERE e.id = :testCaseExecutionId AND e.launchId = :launchId") + boolean existsByTestCaseExecutionIdAndLaunchId( + @Param("testCaseExecutionId") Long testCaseExecutionId, + @Param("launchId") Long launchId + ); } diff --git a/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestFolderRepository.java b/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestFolderRepository.java index 774a47638..cf1de0569 100644 --- a/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestFolderRepository.java +++ b/src/main/java/com/epam/ta/reportportal/dao/tms/TmsTestFolderRepository.java @@ -324,4 +324,27 @@ void updateTestCaseFolder( @Param("testCaseIds") List testCaseIds, @Param("folderId") Long folderId ); + + /** + * Finds unique test folders from test cases in a specific launch with test case counts. + * + * @param launchId launch ID + * @param pageable pagination information + * @return paginated list of unique folders with test case counts + */ + @Query(""" + SELECT new com.epam.ta.reportportal.entity.tms.TmsTestFolderWithCountOfTestCases( + tc.testFolder, + COUNT(DISTINCT tc.id) + ) + FROM TmsTestCaseExecution e + JOIN TmsTestCase tc ON e.testCaseId = tc.id + WHERE e.launchId = :launchId + GROUP BY tc.testFolder.id, tc.testFolder.name, tc.testFolder.description, tc.testFolder.project.id, tc.testFolder.parentTestFolder.id + ORDER BY tc.testFolder.name + """) + Page findUniqueFoldersByLaunchIdWithTestCaseCount( + @Param("launchId") Long launchId, + Pageable pageable + ); } diff --git a/src/main/java/com/epam/ta/reportportal/dao/tms/filterable/TmsTestCaseExecutionFilterableRepository.java b/src/main/java/com/epam/ta/reportportal/dao/tms/filterable/TmsTestCaseExecutionFilterableRepository.java new file mode 100644 index 000000000..3db8391fb --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/dao/tms/filterable/TmsTestCaseExecutionFilterableRepository.java @@ -0,0 +1,132 @@ +package com.epam.ta.reportportal.dao.tms.filterable; + +import static com.epam.ta.reportportal.commons.querygen.constant.GeneralCriteriaConstant.CRITERIA_ID; +import static com.epam.ta.reportportal.dao.util.ResultFetchers.TMS_TEST_CASE_EXECUTION_FETCHER; +import static com.epam.ta.reportportal.jooq.Tables.LAUNCH; +import static com.epam.ta.reportportal.jooq.Tables.TEST_ITEM; +import static com.epam.ta.reportportal.jooq.Tables.TEST_ITEM_RESULTS; +import static com.epam.ta.reportportal.jooq.Tables.TMS_TEST_CASE_EXECUTION; + +import com.epam.ta.reportportal.commons.querygen.Condition; +import com.epam.ta.reportportal.commons.querygen.ConvertibleCondition; +import com.epam.ta.reportportal.commons.querygen.Filter; +import com.epam.ta.reportportal.commons.querygen.FilterCondition; +import com.epam.ta.reportportal.commons.querygen.QueryBuilder; +import com.epam.ta.reportportal.commons.querygen.Queryable; +import com.epam.ta.reportportal.dao.FilterableRepository; +import com.epam.ta.reportportal.entity.tms.TmsTestCaseExecution; +import java.util.Collection; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import lombok.RequiredArgsConstructor; +import org.jooq.DSLContext; +import org.jooq.SelectJoinStep; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.data.support.PageableExecutionUtils; +import org.springframework.stereotype.Repository; + +/** + * Filterable repository for TMS Test Case Execution with JOOQ support. + */ +@Repository +@RequiredArgsConstructor +public class TmsTestCaseExecutionFilterableRepository implements FilterableRepository { + + private final DSLContext dsl; + + @Override + public List findByFilter(Queryable filter) { + Set fields = extractFields(filter, Sort.unsorted()); + + return TMS_TEST_CASE_EXECUTION_FETCHER.apply( + dsl.fetch(QueryBuilder.newBuilder(filter, fields).wrap().build()) + ); + } + + @Override + public Page findByFilter(Queryable filter, Pageable pageable) { + Set fields = extractFields(filter, pageable.getSort()); + + return PageableExecutionUtils.getPage( + TMS_TEST_CASE_EXECUTION_FETCHER.apply( + dsl.fetch(QueryBuilder.newBuilder(filter, fields) + .with(pageable) + .wrap() + .withWrapperSort(pageable.getSort()) + .build()) + ), + pageable, + () -> dsl.fetchCount(QueryBuilder.newBuilder(filter, fields).build()) + ); + } + + /** + * Finds test case executions by launch ID with pagination and filtering. + * + * @param launchId launch ID + * @param filter filter criteria + * @param pageable pagination parameters + * @return page of test case executions + */ + public Page findByLaunchIdWithFilter( + Long launchId, + Filter filter, + Pageable pageable) { + + // Add launch_id condition to filter + filter.withCondition(new FilterCondition( + Condition.EQUALS, + false, + String.valueOf(launchId), + "launchId" // Criteria constant for launch_id field + )); + + return findByFilter(filter, pageable); + } + + /** + * Finds test case executions by test case ID and launch ID. + * + * @param testCaseId test case ID + * @param launchId launch ID + * @return list of executions + */ + public List findByTestCaseIdAndLaunchId(Long testCaseId, Long launchId) { + var query = dsl.select(TMS_TEST_CASE_EXECUTION.fields()) + .select(TEST_ITEM.fields()) + .select(TEST_ITEM_RESULTS.fields()) + .from(TMS_TEST_CASE_EXECUTION) + .leftJoin(TEST_ITEM).on(TEST_ITEM.ITEM_ID.eq(TMS_TEST_CASE_EXECUTION.TEST_ITEM_ID)) + .leftJoin(TEST_ITEM_RESULTS).on(TEST_ITEM_RESULTS.RESULT_ID.eq(TEST_ITEM.ITEM_ID)) + .where(TMS_TEST_CASE_EXECUTION.TEST_CASE_ID.eq(testCaseId)) + .and(TMS_TEST_CASE_EXECUTION.LAUNCH_ID.eq(launchId)) + .orderBy(TEST_ITEM.START_TIME.desc()); + + return TMS_TEST_CASE_EXECUTION_FETCHER.apply(dsl.fetch(query)); + } + + /** + * Extracts fields from filter conditions and sorting. + * + * @param filter filter + * @param sort sorting + * @return set of field names + */ + private Set extractFields(Queryable filter, Sort sort) { + Set fields = filter.getFilterConditions() + .stream() + .map(ConvertibleCondition::getAllConditions) + .flatMap(Collection::stream) + .map(FilterCondition::getSearchCriteria) + .collect(Collectors.toSet()); + + fields.addAll(sort.get() + .map(Sort.Order::getProperty) + .collect(Collectors.toSet())); + + return fields; + } +} diff --git a/src/main/java/com/epam/ta/reportportal/dao/util/RecordMappers.java b/src/main/java/com/epam/ta/reportportal/dao/util/RecordMappers.java index 44697e763..d6658550c 100644 --- a/src/main/java/com/epam/ta/reportportal/dao/util/RecordMappers.java +++ b/src/main/java/com/epam/ta/reportportal/dao/util/RecordMappers.java @@ -45,11 +45,13 @@ import static com.epam.ta.reportportal.jooq.Tables.TICKET; import static com.epam.ta.reportportal.jooq.Tables.TMS_ATTRIBUTE; import static com.epam.ta.reportportal.jooq.Tables.TMS_TEST_CASE; +import static com.epam.ta.reportportal.jooq.Tables.TMS_TEST_CASE_EXECUTION_COMMENT; import static com.epam.ta.reportportal.jooq.Tables.TMS_TEST_FOLDER; import static com.epam.ta.reportportal.jooq.Tables.TMS_TEST_PLAN; import static com.epam.ta.reportportal.jooq.Tables.WIDGET; import static com.epam.ta.reportportal.jooq.tables.JActivity.ACTIVITY; import static com.epam.ta.reportportal.jooq.tables.JAttachment.ATTACHMENT; +import static com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION; import static com.epam.ta.reportportal.jooq.tables.JUsers.USERS; import static java.util.Optional.empty; import static java.util.Optional.ofNullable; @@ -102,6 +104,8 @@ import com.epam.ta.reportportal.entity.statistics.StatisticsField; import com.epam.ta.reportportal.entity.tms.TmsAttribute; import com.epam.ta.reportportal.entity.tms.TmsTestCase; +import com.epam.ta.reportportal.entity.tms.TmsTestCaseExecution; +import com.epam.ta.reportportal.entity.tms.TmsTestCaseExecutionComment; import com.epam.ta.reportportal.entity.tms.TmsTestFolder; import com.epam.ta.reportportal.entity.tms.TmsTestPlan; import com.epam.ta.reportportal.entity.user.OrganizationUser; @@ -817,4 +821,56 @@ public class RecordMappers { attribute.setKey(r.get(TMS_ATTRIBUTE.KEY)); return attribute; }; + + /** + * Maps record into {@link TmsTestCaseExecution} object + */ + public static final RecordMapper TMS_TEST_CASE_EXECUTION_MAPPER = r -> { + TmsTestCaseExecution execution = new TmsTestCaseExecution(); + execution.setId(r.get(TMS_TEST_CASE_EXECUTION.ID)); + execution.setTestCaseId(r.get(TMS_TEST_CASE_EXECUTION.TEST_CASE_ID)); + execution.setLaunchId(r.get(TMS_TEST_CASE_EXECUTION.LAUNCH_ID)); + execution.setTestCaseVersionId(r.get(TMS_TEST_CASE_EXECUTION.TEST_CASE_VERSION_ID)); + execution.setTestCaseSnapshot(r.get(TMS_TEST_CASE_EXECUTION.TEST_CASE_SNAPSHOT, String.class)); + + //Create TestItem with id, if test_item_id exists + ofNullable(r.get(TMS_TEST_CASE_EXECUTION.TEST_ITEM_ID)).ifPresent(testItemId -> { + TestItem testItem = new TestItem(); + testItem.setItemId(testItemId); + + // If there is test_item from JOIN - fill that + ofNullable(r.field(TEST_ITEM.START_TIME)).flatMap(f -> ofNullable(r.get(f, Instant.class))) + .ifPresent(testItem::setStartTime); + ofNullable(r.field(TEST_ITEM.NAME)).flatMap(f -> ofNullable(r.get(f, String.class))) + .ifPresent(testItem::setName); + + // Get TestItemResults + ofNullable(r.field(TEST_ITEM_RESULTS.RESULT_ID)) + .flatMap(f -> ofNullable(r.get(f, Long.class))) + .ifPresent(resultId -> { + TestItemResults results = new TestItemResults(); + results.setItemId(resultId); + ofNullable(r.field(TEST_ITEM_RESULTS.STATUS)).flatMap(f -> ofNullable(r.get(f))) + .ifPresent(status -> results.setStatus(StatusEnum.valueOf(status.getLiteral()))); + ofNullable(r.field(TEST_ITEM_RESULTS.END_TIME)).flatMap(f -> ofNullable(r.get(f, Instant.class))) + .ifPresent(results::setEndTime); + testItem.setItemResults(results); + }); + + execution.setTestItem(testItem); + }); + + ofNullable(r.field(TMS_TEST_CASE_EXECUTION_COMMENT.ID)) + .flatMap(f -> ofNullable(r.get(f, Long.class))) + .ifPresent(commentId -> { + TmsTestCaseExecutionComment comment = new TmsTestCaseExecutionComment(); + comment.setId(commentId); + ofNullable(r.field(TMS_TEST_CASE_EXECUTION_COMMENT.COMMENT)) + .flatMap(f -> ofNullable(r.get(f, String.class))) + .ifPresent(comment::setComment); + execution.setExecutionComment(comment); + }); + + return execution; + }; } diff --git a/src/main/java/com/epam/ta/reportportal/dao/util/ResultFetchers.java b/src/main/java/com/epam/ta/reportportal/dao/util/ResultFetchers.java index b58b42889..c57e31e78 100644 --- a/src/main/java/com/epam/ta/reportportal/dao/util/ResultFetchers.java +++ b/src/main/java/com/epam/ta/reportportal/dao/util/ResultFetchers.java @@ -30,6 +30,7 @@ import static com.epam.ta.reportportal.dao.util.RecordMappers.PROJECT_USER_MAPPER; import static com.epam.ta.reportportal.dao.util.RecordMappers.TICKET_MAPPER; import static com.epam.ta.reportportal.dao.util.RecordMappers.TMS_ATTRIBUTE_MAPPER; +import static com.epam.ta.reportportal.dao.util.RecordMappers.TMS_TEST_CASE_EXECUTION_MAPPER; import static com.epam.ta.reportportal.dao.util.RecordMappers.TMS_TEST_CASE_MAPPER; import static com.epam.ta.reportportal.dao.util.RecordMappers.TMS_TEST_FOLDER_MAPPER; import static com.epam.ta.reportportal.dao.util.RecordMappers.TMS_TEST_PLAN_MAPPER; @@ -51,6 +52,7 @@ import static com.epam.ta.reportportal.jooq.tables.JProject.PROJECT; import static com.epam.ta.reportportal.jooq.tables.JProjectUser.PROJECT_USER; import static com.epam.ta.reportportal.jooq.tables.JTestItem.TEST_ITEM; +import static com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION; import static com.epam.ta.reportportal.jooq.tables.JUsers.USERS; import static java.util.Optional.ofNullable; @@ -78,6 +80,7 @@ import com.epam.ta.reportportal.entity.project.ProjectProfile; import com.epam.ta.reportportal.entity.tms.TmsAttribute; import com.epam.ta.reportportal.entity.tms.TmsTestCase; +import com.epam.ta.reportportal.entity.tms.TmsTestCaseExecution; import com.epam.ta.reportportal.entity.tms.TmsTestFolder; import com.epam.ta.reportportal.entity.tms.TmsTestPlan; import com.epam.ta.reportportal.entity.user.OrganizationUser; @@ -563,4 +566,18 @@ private ResultFetchers() { }); return new ArrayList<>(attributes.values()); }; + + /** + * Fetches records from db results into list of {@link TmsTestCaseExecution} objects. + */ + public static final Function, List> TMS_TEST_CASE_EXECUTION_FETCHER = rows -> { + Map executions = Maps.newLinkedHashMap(); + rows.forEach(row -> { + Long id = row.get(TMS_TEST_CASE_EXECUTION.ID); + if (!executions.containsKey(id)) { + executions.put(id, TMS_TEST_CASE_EXECUTION_MAPPER.map(row)); + } + }); + return new ArrayList<>(executions.values()); + }; } diff --git a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsAttachment.java b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsAttachment.java index dc502b12c..66c6429d5 100644 --- a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsAttachment.java +++ b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsAttachment.java @@ -71,8 +71,12 @@ public class TmsAttachment implements Serializable { @ToString.Exclude private Set manualScenarioPreconditions; + @ManyToMany(mappedBy = "attachments") + @ToString.Exclude + private Set executionComments; + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "environment_id") private TmsEnvironment environment; -} +} \ No newline at end of file diff --git a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsManualLaunchAttribute.java b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsManualLaunchAttribute.java new file mode 100644 index 000000000..4032780e6 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsManualLaunchAttribute.java @@ -0,0 +1,44 @@ +package com.epam.ta.reportportal.entity.tms; + +import com.epam.ta.reportportal.entity.launch.Launch; +import jakarta.persistence.Column; +import jakarta.persistence.EmbeddedId; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapsId; +import jakarta.persistence.Table; +import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * Entity representing TMS Manual Launch Attribute. + */ +@Entity +@Table(name = "tms_manual_launch_attribute") +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TmsManualLaunchAttribute implements Serializable { + + @EmbeddedId + private TmsManualLaunchAttributeId id; + + @ManyToOne + @MapsId(value = "launchId") + @JoinColumn(name = "launch_id") + private Launch launch; + + @ManyToOne + @MapsId(value = "attributeId") + @JoinColumn(name = "attribute_id") + private TmsAttribute attribute; + + @Column(name = "value") + private String value; +} diff --git a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsManualLaunchAttributeId.java b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsManualLaunchAttributeId.java new file mode 100644 index 000000000..3927a67aa --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsManualLaunchAttributeId.java @@ -0,0 +1,39 @@ +package com.epam.ta.reportportal.entity.tms; + +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import java.io.Serializable; +import java.util.Objects; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Embeddable +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +public class TmsManualLaunchAttributeId implements Serializable { + + @Column(name = "launch_id") + private Long launchId; + + @Column(name = "attribute_id") + private Long attributeId; + + @Override + public boolean equals(Object o) { + if (o == null || getClass() != o.getClass()) { + return false; + } + TmsManualLaunchAttributeId that = (TmsManualLaunchAttributeId) o; + return Objects.equals(launchId, that.launchId) && Objects.equals(attributeId, + that.attributeId); + } + + @Override + public int hashCode() { + return Objects.hash(launchId, attributeId); + } +} diff --git a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCase.java b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCase.java index 8e0fda270..50490b892 100644 --- a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCase.java +++ b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCase.java @@ -87,20 +87,4 @@ public class TmsTestCase implements Serializable { @ManyToMany(mappedBy = "testCases") @ToString.Exclude private Set testPlans; - - @ManyToMany - @JoinTable( - name = "tms_test_case_launch", - joinColumns = @JoinColumn(name = "test_case_id"), - inverseJoinColumns = @JoinColumn(name = "launch_id")) - @ToString.Exclude - private Set launches; - - @ManyToMany - @JoinTable( - name = "tms_test_case_test_item", - joinColumns = @JoinColumn(name = "test_case_id"), - inverseJoinColumns = @JoinColumn(name = "test_item_id")) - @ToString.Exclude - private Set testItems; } diff --git a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecution.java b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecution.java index e6cd75649..40fe4bdf8 100644 --- a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecution.java +++ b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecution.java @@ -1,6 +1,7 @@ package com.epam.ta.reportportal.entity.tms; import com.epam.ta.reportportal.entity.item.TestItem; +import jakarta.persistence.CascadeType; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; @@ -14,7 +15,9 @@ import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import lombok.ToString; import org.hibernate.annotations.JdbcTypeCode; import org.hibernate.type.SqlTypes; @@ -28,14 +31,16 @@ @NoArgsConstructor @AllArgsConstructor @Builder +@EqualsAndHashCode(of = "id") public class TmsTestCaseExecution implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; - @OneToOne(fetch = FetchType.LAZY) + @OneToOne @JoinColumn(name = "test_item_id", unique = true) + @ToString.Exclude private TestItem testItem; @Column(name = "test_case_id") @@ -50,4 +55,8 @@ public class TmsTestCaseExecution implements Serializable { @JdbcTypeCode(SqlTypes.JSON) @Column(name = "test_case_snapshot", nullable = false, columnDefinition = "jsonb") private String testCaseSnapshot; + + @OneToOne(mappedBy = "execution") + @ToString.Exclude + private TmsTestCaseExecutionComment executionComment; } diff --git a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecutionComment.java b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecutionComment.java new file mode 100644 index 000000000..442a8e7ab --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecutionComment.java @@ -0,0 +1,56 @@ +package com.epam.ta.reportportal.entity.tms; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.JoinTable; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Set; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.ToString; + +/** + * Entity representing a comment for test case execution. + */ +@Entity +@Table(name = "tms_test_case_execution_comment") +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@EqualsAndHashCode(of = "id") +public class TmsTestCaseExecutionComment implements Serializable { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + @OneToOne + @JoinColumn(name = "execution_id", nullable = false, unique = true) + @ToString.Exclude + private TmsTestCaseExecution execution; + + @Column(name = "comment", columnDefinition = "text") + private String comment; + + @ManyToMany + @JoinTable( + name = "tms_test_case_execution_comment_attachment", + joinColumns = @JoinColumn(name = "execution_comment_id"), + inverseJoinColumns = @JoinColumn(name = "attachment_id")) + @ToString.Exclude + private Set attachments; +} diff --git a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecutionCommentAttachment.java b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecutionCommentAttachment.java new file mode 100644 index 000000000..5cfb9f289 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecutionCommentAttachment.java @@ -0,0 +1,65 @@ +package com.epam.ta.reportportal.entity.tms; + +import jakarta.persistence.EmbeddedId; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MapsId; +import jakarta.persistence.Table; +import java.util.Objects; +import lombok.Getter; +import lombok.Setter; + +/** + * Junction entity for Many-to-Many relationship between TmsTestCaseExecutionComment and + * TmsAttachment. + */ +@Entity +@Table(name = "tms_test_case_execution_comment_attachment") +@Getter +@Setter +public class TmsTestCaseExecutionCommentAttachment { + + @EmbeddedId + private TmsTestCaseExecutionCommentAttachmentId id; + + @ManyToOne(fetch = FetchType.LAZY) + @MapsId("executionCommentId") + @JoinColumn(name = "execution_comment_id", nullable = false) + private TmsTestCaseExecutionComment executionComment; + + @ManyToOne(fetch = FetchType.LAZY) + @MapsId("attachmentId") + @JoinColumn(name = "attachment_id", nullable = false) + private TmsAttachment attachment; + + public TmsTestCaseExecutionCommentAttachment() { + this.id = new TmsTestCaseExecutionCommentAttachmentId(); + } + + public TmsTestCaseExecutionCommentAttachment(TmsTestCaseExecutionComment executionComment, + TmsAttachment attachment) { + this.id = new TmsTestCaseExecutionCommentAttachmentId(executionComment.getId(), + attachment.getId()); + this.executionComment = executionComment; + this.attachment = attachment; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TmsTestCaseExecutionCommentAttachment that = (TmsTestCaseExecutionCommentAttachment) o; + return Objects.equals(id, that.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } +} diff --git a/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecutionCommentAttachmentId.java b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecutionCommentAttachmentId.java new file mode 100644 index 000000000..0f00eee53 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/entity/tms/TmsTestCaseExecutionCommentAttachmentId.java @@ -0,0 +1,53 @@ +package com.epam.ta.reportportal.entity.tms; + +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import java.io.Serializable; +import java.util.Objects; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * Composite primary key for TmsTestCaseExecutionCommentAttachment entity. + */ +@Embeddable +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +public class TmsTestCaseExecutionCommentAttachmentId implements Serializable { + + @Column(name = "execution_comment_id") + private Long executionCommentId; + + @Column(name = "attachment_id") + private Long attachmentId; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TmsTestCaseExecutionCommentAttachmentId that = (TmsTestCaseExecutionCommentAttachmentId) o; + return Objects.equals(executionCommentId, that.executionCommentId) + && Objects.equals(attachmentId, that.attachmentId); + } + + @Override + public int hashCode() { + return Objects.hash(executionCommentId, attachmentId); + } + + @Override + public String toString() { + return "TmsTestCaseExecutionCommentAttachmentId{" + + "executionCommentId=" + executionCommentId + + ", attachmentId=" + attachmentId + + '}'; + } +} diff --git a/src/main/java/com/epam/ta/reportportal/jooq/Indexes.java b/src/main/java/com/epam/ta/reportportal/jooq/Indexes.java index dc04bff73..f4d491f68 100644 --- a/src/main/java/com/epam/ta/reportportal/jooq/Indexes.java +++ b/src/main/java/com/epam/ta/reportportal/jooq/Indexes.java @@ -38,8 +38,8 @@ import com.epam.ta.reportportal.jooq.tables.JTmsManualScenarioPreconditionsAttachment; import com.epam.ta.reportportal.jooq.tables.JTmsStepAttachment; import com.epam.ta.reportportal.jooq.tables.JTmsTestCase; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecution; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseLaunch; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionComment; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionCommentAttachment; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseVersion; import com.epam.ta.reportportal.jooq.tables.JTmsTestPlan; import com.epam.ta.reportportal.jooq.tables.JTmsTextManualScenarioAttachment; @@ -83,17 +83,13 @@ public class Indexes { public static final Index IDX_TMS_ATTACHMENT_EXPIRES_AT = Internal.createIndex(DSL.name("idx_tms_attachment_expires_at"), JTmsAttachment.TMS_ATTACHMENT, new OrderField[] { JTmsAttachment.TMS_ATTACHMENT.EXPIRES_AT }, false); public static final Index IDX_TMS_ATTACHMENT_PATH = Internal.createIndex(DSL.name("idx_tms_attachment_path"), JTmsAttachment.TMS_ATTACHMENT, new OrderField[] { JTmsAttachment.TMS_ATTACHMENT.PATH_TO_FILE }, false); public static final Index IDX_TMS_ATTRIBUTE_SEARCH_VECTOR = Internal.createIndex(DSL.name("idx_tms_attribute_search_vector"), JTmsAttribute.TMS_ATTRIBUTE, new OrderField[] { JTmsAttribute.TMS_ATTRIBUTE.SEARCH_VECTOR }, false); + public static final Index IDX_TMS_EXECUTION_COMMENT_ATTACHMENT_ATTACHMENT_ID = Internal.createIndex(DSL.name("idx_tms_execution_comment_attachment_attachment_id"), JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT, new OrderField[] { JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT.ATTACHMENT_ID }, false); + public static final Index IDX_TMS_EXECUTION_COMMENT_ATTACHMENT_COMMENT_ID = Internal.createIndex(DSL.name("idx_tms_execution_comment_attachment_comment_id"), JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT, new OrderField[] { JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT.EXECUTION_COMMENT_ID }, false); public static final Index IDX_TMS_MANUAL_SCENARIO_PRECONDITIONS_SCENARIO_UNIQUE = Internal.createIndex(DSL.name("idx_tms_manual_scenario_preconditions_scenario_unique"), JTmsManualScenarioPreconditions.TMS_MANUAL_SCENARIO_PRECONDITIONS, new OrderField[] { JTmsManualScenarioPreconditions.TMS_MANUAL_SCENARIO_PRECONDITIONS.MANUAL_SCENARIO_ID }, true); public static final Index IDX_TMS_MANUAL_SCENARIO_TYPE = Internal.createIndex(DSL.name("idx_tms_manual_scenario_type"), JTmsManualScenario.TMS_MANUAL_SCENARIO, new OrderField[] { JTmsManualScenario.TMS_MANUAL_SCENARIO.TYPE }, false); public static final Index IDX_TMS_STEP_ATTACHMENT_ATTACHMENT_ID = Internal.createIndex(DSL.name("idx_tms_step_attachment_attachment_id"), JTmsStepAttachment.TMS_STEP_ATTACHMENT, new OrderField[] { JTmsStepAttachment.TMS_STEP_ATTACHMENT.ATTACHMENT_ID }, false); public static final Index IDX_TMS_STEP_ATTACHMENT_STEP_ID = Internal.createIndex(DSL.name("idx_tms_step_attachment_step_id"), JTmsStepAttachment.TMS_STEP_ATTACHMENT, new OrderField[] { JTmsStepAttachment.TMS_STEP_ATTACHMENT.STEP_ID }, false); - public static final Index IDX_TMS_TEST_CASE_EXECUTION_CASE_ITEM = Internal.createIndex(DSL.name("idx_tms_test_case_execution_case_item"), JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, new OrderField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.TEST_CASE_ID, JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.TEST_ITEM_ID }, false); - public static final Index IDX_TMS_TEST_CASE_EXECUTION_SNAPSHOT = Internal.createIndex(DSL.name("idx_tms_test_case_execution_snapshot"), JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, new OrderField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.TEST_CASE_SNAPSHOT }, false); - public static final Index IDX_TMS_TEST_CASE_EXECUTION_TEST_CASE_ID = Internal.createIndex(DSL.name("idx_tms_test_case_execution_test_case_id"), JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, new OrderField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.TEST_CASE_ID }, false); - public static final Index IDX_TMS_TEST_CASE_EXECUTION_TEST_ITEM_ID = Internal.createIndex(DSL.name("idx_tms_test_case_execution_test_item_id"), JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, new OrderField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.TEST_ITEM_ID }, false); - public static final Index IDX_TMS_TEST_CASE_EXECUTION_VERSION_ID = Internal.createIndex(DSL.name("idx_tms_test_case_execution_version_id"), JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, new OrderField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.TEST_CASE_VERSION_ID }, false); - public static final Index IDX_TMS_TEST_CASE_LAUNCH_LAUNCH_ID = Internal.createIndex(DSL.name("idx_tms_test_case_launch_launch_id"), JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH, new OrderField[] { JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH.LAUNCH_ID }, false); - public static final Index IDX_TMS_TEST_CASE_LAUNCH_TEST_CASE_ID = Internal.createIndex(DSL.name("idx_tms_test_case_launch_test_case_id"), JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH, new OrderField[] { JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH.TEST_CASE_ID }, false); + public static final Index IDX_TMS_TEST_CASE_EXECUTION_COMMENT_EXECUTION_ID = Internal.createIndex(DSL.name("idx_tms_test_case_execution_comment_execution_id"), JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT, new OrderField[] { JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT.EXECUTION_ID }, false); public static final Index IDX_TMS_TEST_CASE_SEARCH_VECTOR = Internal.createIndex(DSL.name("idx_tms_test_case_search_vector"), JTmsTestCase.TMS_TEST_CASE, new OrderField[] { JTmsTestCase.TMS_TEST_CASE.SEARCH_VECTOR }, false); public static final Index IDX_TMS_TEST_CASE_VERSION_DEFAULT = Internal.createIndex(DSL.name("idx_tms_test_case_version_default"), JTmsTestCaseVersion.TMS_TEST_CASE_VERSION, new OrderField[] { JTmsTestCaseVersion.TMS_TEST_CASE_VERSION.TEST_CASE_ID }, true); public static final Index IDX_TMS_TEST_PLAN_SEARCH_VECTOR = Internal.createIndex(DSL.name("idx_tms_test_plan_search_vector"), JTmsTestPlan.TMS_TEST_PLAN, new OrderField[] { JTmsTestPlan.TMS_TEST_PLAN.SEARCH_VECTOR }, false); diff --git a/src/main/java/com/epam/ta/reportportal/jooq/JPublic.java b/src/main/java/com/epam/ta/reportportal/jooq/JPublic.java index 4fe30a825..ace561bf7 100644 --- a/src/main/java/com/epam/ta/reportportal/jooq/JPublic.java +++ b/src/main/java/com/epam/ta/reportportal/jooq/JPublic.java @@ -77,7 +77,8 @@ import com.epam.ta.reportportal.jooq.tables.JTmsTestCase; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseAttribute; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecution; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseLaunch; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionComment; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionCommentAttachment; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseVersion; import com.epam.ta.reportportal.jooq.tables.JTmsTestFolder; import com.epam.ta.reportportal.jooq.tables.JTmsTestPlan; @@ -518,9 +519,14 @@ public static JPgpArmorHeaders PGP_ARMOR_HEADERS( public final JTmsTestCaseExecution TMS_TEST_CASE_EXECUTION = JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION; /** - * The table public.tms_test_case_launch. + * The table public.tms_test_case_execution_comment. */ - public final JTmsTestCaseLaunch TMS_TEST_CASE_LAUNCH = JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH; + public final JTmsTestCaseExecutionComment TMS_TEST_CASE_EXECUTION_COMMENT = JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT; + + /** + * The table public.tms_test_case_execution_comment_attachment. + */ + public final JTmsTestCaseExecutionCommentAttachment TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT = JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT; /** * The table public.tms_test_case_version. @@ -678,7 +684,8 @@ public final List> getTables() { JTmsTestCase.TMS_TEST_CASE, JTmsTestCaseAttribute.TMS_TEST_CASE_ATTRIBUTE, JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, - JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH, + JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT, + JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT, JTmsTestCaseVersion.TMS_TEST_CASE_VERSION, JTmsTestFolder.TMS_TEST_FOLDER, JTmsTestPlan.TMS_TEST_PLAN, diff --git a/src/main/java/com/epam/ta/reportportal/jooq/Keys.java b/src/main/java/com/epam/ta/reportportal/jooq/Keys.java index 02d82772a..2ae5bfff9 100644 --- a/src/main/java/com/epam/ta/reportportal/jooq/Keys.java +++ b/src/main/java/com/epam/ta/reportportal/jooq/Keys.java @@ -76,7 +76,8 @@ import com.epam.ta.reportportal.jooq.tables.JTmsTestCase; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseAttribute; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecution; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseLaunch; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionComment; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionCommentAttachment; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseVersion; import com.epam.ta.reportportal.jooq.tables.JTmsTestFolder; import com.epam.ta.reportportal.jooq.tables.JTmsTestPlan; @@ -159,8 +160,9 @@ import com.epam.ta.reportportal.jooq.tables.records.JTmsStepRecord; import com.epam.ta.reportportal.jooq.tables.records.JTmsStepsManualScenarioRecord; import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseAttributeRecord; +import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseExecutionCommentAttachmentRecord; +import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseExecutionCommentRecord; import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseExecutionRecord; -import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseLaunchRecord; import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseRecord; import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseVersionRecord; import com.epam.ta.reportportal.jooq.tables.records.JTmsTestFolderRecord; @@ -294,7 +296,9 @@ public class Keys { public static final UniqueKey TMS_TEST_CASE_ATTRIBUTE_PKEY = Internal.createUniqueKey(JTmsTestCaseAttribute.TMS_TEST_CASE_ATTRIBUTE, DSL.name("tms_test_case_attribute_pkey"), new TableField[] { JTmsTestCaseAttribute.TMS_TEST_CASE_ATTRIBUTE.ATTRIBUTE_ID, JTmsTestCaseAttribute.TMS_TEST_CASE_ATTRIBUTE.TEST_CASE_ID }, true); public static final UniqueKey TMS_TEST_CASE_EXECUTION_PK = Internal.createUniqueKey(JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, DSL.name("tms_test_case_execution_pk"), new TableField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.ID }, true); public static final UniqueKey TMS_TEST_CASE_EXECUTION_TEST_ITEM_ID_KEY = Internal.createUniqueKey(JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, DSL.name("tms_test_case_execution_test_item_id_key"), new TableField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.TEST_ITEM_ID }, true); - public static final UniqueKey TMS_TEST_CASE_LAUNCH_PKEY = Internal.createUniqueKey(JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH, DSL.name("tms_test_case_launch_pkey"), new TableField[] { JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH.TEST_CASE_ID, JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH.LAUNCH_ID }, true); + public static final UniqueKey TMS_TEST_CASE_EXECUTION_COMMENT_EXECUTION_ID_KEY = Internal.createUniqueKey(JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT, DSL.name("tms_test_case_execution_comment_execution_id_key"), new TableField[] { JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT.EXECUTION_ID }, true); + public static final UniqueKey TMS_TEST_CASE_EXECUTION_COMMENT_PK = Internal.createUniqueKey(JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT, DSL.name("tms_test_case_execution_comment_pk"), new TableField[] { JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT.ID }, true); + public static final UniqueKey TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT_PKEY = Internal.createUniqueKey(JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT, DSL.name("tms_test_case_execution_comment_attachment_pkey"), new TableField[] { JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT.EXECUTION_COMMENT_ID, JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT.ATTACHMENT_ID }, true); public static final UniqueKey TMS_TEST_CASE_VERSION_PK = Internal.createUniqueKey(JTmsTestCaseVersion.TMS_TEST_CASE_VERSION, DSL.name("tms_test_case_version_pk"), new TableField[] { JTmsTestCaseVersion.TMS_TEST_CASE_VERSION.ID }, true); public static final UniqueKey TMS_TEST_FOLDER_PK = Internal.createUniqueKey(JTmsTestFolder.TMS_TEST_FOLDER, DSL.name("tms_test_folder_pk"), new TableField[] { JTmsTestFolder.TMS_TEST_FOLDER.ID }, true); public static final UniqueKey TMS_TEST_PLAN_LAUNCH_ID_KEY = Internal.createUniqueKey(JTmsTestPlan.TMS_TEST_PLAN, DSL.name("tms_test_plan_launch_id_key"), new TableField[] { JTmsTestPlan.TMS_TEST_PLAN.LAUNCH_ID }, true); @@ -399,11 +403,10 @@ public class Keys { public static final ForeignKey TMS_TEST_CASE__TMS_TEST_CASE_FK_TEST_FOLDER = Internal.createForeignKey(JTmsTestCase.TMS_TEST_CASE, DSL.name("tms_test_case_fk_test_folder"), new TableField[] { JTmsTestCase.TMS_TEST_CASE.TEST_FOLDER_ID }, Keys.TMS_TEST_FOLDER_PK, new TableField[] { JTmsTestFolder.TMS_TEST_FOLDER.ID }, true); public static final ForeignKey TMS_TEST_CASE_ATTRIBUTE__TMS_TEST_CASE_ATTRIBUTE_FK_ATTRIBUTE = Internal.createForeignKey(JTmsTestCaseAttribute.TMS_TEST_CASE_ATTRIBUTE, DSL.name("tms_test_case_attribute_fk_attribute"), new TableField[] { JTmsTestCaseAttribute.TMS_TEST_CASE_ATTRIBUTE.ATTRIBUTE_ID }, Keys.TMS_ATTRIBUTE_PK, new TableField[] { JTmsAttribute.TMS_ATTRIBUTE.ID }, true); public static final ForeignKey TMS_TEST_CASE_ATTRIBUTE__TMS_TEST_CASE_ATTRIBUTE_FK_TEST_CASE = Internal.createForeignKey(JTmsTestCaseAttribute.TMS_TEST_CASE_ATTRIBUTE, DSL.name("tms_test_case_attribute_fk_test_case"), new TableField[] { JTmsTestCaseAttribute.TMS_TEST_CASE_ATTRIBUTE.TEST_CASE_ID }, Keys.TMS_TEST_CASE_PK, new TableField[] { JTmsTestCase.TMS_TEST_CASE.ID }, true); - public static final ForeignKey TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_CASE = Internal.createForeignKey(JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, DSL.name("tms_test_case_execution_fk_test_case"), new TableField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.TEST_CASE_ID }, Keys.TMS_TEST_CASE_PK, new TableField[] { JTmsTestCase.TMS_TEST_CASE.ID }, true); - public static final ForeignKey TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_CASE_VERSION = Internal.createForeignKey(JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, DSL.name("tms_test_case_execution_fk_test_case_version"), new TableField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.TEST_CASE_VERSION_ID }, Keys.TMS_TEST_CASE_VERSION_PK, new TableField[] { JTmsTestCaseVersion.TMS_TEST_CASE_VERSION.ID }, true); public static final ForeignKey TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_ITEM = Internal.createForeignKey(JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION, DSL.name("tms_test_case_execution_fk_test_item"), new TableField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.TEST_ITEM_ID }, Keys.TEST_ITEM_PK, new TableField[] { JTestItem.TEST_ITEM.ITEM_ID }, true); - public static final ForeignKey TMS_TEST_CASE_LAUNCH__TMS_TEST_CASE_LAUNCH_FK_LAUNCH = Internal.createForeignKey(JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH, DSL.name("tms_test_case_launch_fk_launch"), new TableField[] { JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH.LAUNCH_ID }, Keys.LAUNCH_PK, new TableField[] { JLaunch.LAUNCH.ID }, true); - public static final ForeignKey TMS_TEST_CASE_LAUNCH__TMS_TEST_CASE_LAUNCH_FK_TEST_CASE = Internal.createForeignKey(JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH, DSL.name("tms_test_case_launch_fk_test_case"), new TableField[] { JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH.TEST_CASE_ID }, Keys.TMS_TEST_CASE_PK, new TableField[] { JTmsTestCase.TMS_TEST_CASE.ID }, true); + public static final ForeignKey TMS_TEST_CASE_EXECUTION_COMMENT__TMS_TEST_CASE_EXECUTION_COMMENT_FK_EXECUTION = Internal.createForeignKey(JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT, DSL.name("tms_test_case_execution_comment_fk_execution"), new TableField[] { JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT.EXECUTION_ID }, Keys.TMS_TEST_CASE_EXECUTION_PK, new TableField[] { JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION.ID }, true); + public static final ForeignKey TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT__TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT_FK_ATTACHMENT = Internal.createForeignKey(JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT, DSL.name("tms_test_case_execution_comment_attachment_fk_attachment"), new TableField[] { JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT.ATTACHMENT_ID }, Keys.TMS_ATTACHMENT_PK, new TableField[] { JTmsAttachment.TMS_ATTACHMENT.ID }, true); + public static final ForeignKey TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT__TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT_FK_COMMENT = Internal.createForeignKey(JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT, DSL.name("tms_test_case_execution_comment_attachment_fk_comment"), new TableField[] { JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT.EXECUTION_COMMENT_ID }, Keys.TMS_TEST_CASE_EXECUTION_COMMENT_PK, new TableField[] { JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT.ID }, true); public static final ForeignKey TMS_TEST_CASE_VERSION__TMS_TEST_CASE_VERSION_FK_TEST_CASE = Internal.createForeignKey(JTmsTestCaseVersion.TMS_TEST_CASE_VERSION, DSL.name("tms_test_case_version_fk_test_case"), new TableField[] { JTmsTestCaseVersion.TMS_TEST_CASE_VERSION.TEST_CASE_ID }, Keys.TMS_TEST_CASE_PK, new TableField[] { JTmsTestCase.TMS_TEST_CASE.ID }, true); public static final ForeignKey TMS_TEST_FOLDER__TMS_TEST_FOLDER_FK_PARENT = Internal.createForeignKey(JTmsTestFolder.TMS_TEST_FOLDER, DSL.name("tms_test_folder_fk_parent"), new TableField[] { JTmsTestFolder.TMS_TEST_FOLDER.PARENT_ID }, Keys.TMS_TEST_FOLDER_PK, new TableField[] { JTmsTestFolder.TMS_TEST_FOLDER.ID }, true); public static final ForeignKey TMS_TEST_FOLDER__TMS_TEST_FOLDER_FK_PROJECT = Internal.createForeignKey(JTmsTestFolder.TMS_TEST_FOLDER, DSL.name("tms_test_folder_fk_project"), new TableField[] { JTmsTestFolder.TMS_TEST_FOLDER.PROJECT_ID }, Keys.PROJECT_PK, new TableField[] { JProject.PROJECT.ID }, true); diff --git a/src/main/java/com/epam/ta/reportportal/jooq/Tables.java b/src/main/java/com/epam/ta/reportportal/jooq/Tables.java index 06b1c1945..24880d2f9 100644 --- a/src/main/java/com/epam/ta/reportportal/jooq/Tables.java +++ b/src/main/java/com/epam/ta/reportportal/jooq/Tables.java @@ -77,7 +77,8 @@ import com.epam.ta.reportportal.jooq.tables.JTmsTestCase; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseAttribute; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecution; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseLaunch; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionComment; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionCommentAttachment; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseVersion; import com.epam.ta.reportportal.jooq.tables.JTmsTestFolder; import com.epam.ta.reportportal.jooq.tables.JTmsTestPlan; @@ -504,9 +505,14 @@ public static JPgpArmorHeaders PGP_ARMOR_HEADERS( public static final JTmsTestCaseExecution TMS_TEST_CASE_EXECUTION = JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION; /** - * The table public.tms_test_case_launch. + * The table public.tms_test_case_execution_comment. */ - public static final JTmsTestCaseLaunch TMS_TEST_CASE_LAUNCH = JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH; + public static final JTmsTestCaseExecutionComment TMS_TEST_CASE_EXECUTION_COMMENT = JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT; + + /** + * The table public.tms_test_case_execution_comment_attachment. + */ + public static final JTmsTestCaseExecutionCommentAttachment TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT = JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT; /** * The table public.tms_test_case_version. diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/JLaunch.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/JLaunch.java index 3f0e61006..0d691c044 100644 --- a/src/main/java/com/epam/ta/reportportal/jooq/tables/JLaunch.java +++ b/src/main/java/com/epam/ta/reportportal/jooq/tables/JLaunch.java @@ -18,8 +18,6 @@ import com.epam.ta.reportportal.jooq.tables.JStatistics.JStatisticsPath; import com.epam.ta.reportportal.jooq.tables.JStatisticsField.JStatisticsFieldPath; import com.epam.ta.reportportal.jooq.tables.JTestItem.JTestItemPath; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCase.JTmsTestCasePath; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseLaunch.JTmsTestCaseLaunchPath; import com.epam.ta.reportportal.jooq.tables.JTmsTestPlan.JTmsTestPlanPath; import com.epam.ta.reportportal.jooq.tables.JUsers.JUsersPath; import com.epam.ta.reportportal.jooq.tables.records.JLaunchRecord; @@ -331,19 +329,6 @@ public JTestItemPath testItem() { return _testItem; } - private transient JTmsTestCaseLaunchPath _tmsTestCaseLaunch; - - /** - * Get the implicit to-many join path to the - * public.tms_test_case_launch table - */ - public JTmsTestCaseLaunchPath tmsTestCaseLaunch() { - if (_tmsTestCaseLaunch == null) - _tmsTestCaseLaunch = new JTmsTestCaseLaunchPath(this, null, Keys.TMS_TEST_CASE_LAUNCH__TMS_TEST_CASE_LAUNCH_FK_LAUNCH.getInverseKey()); - - return _tmsTestCaseLaunch; - } - private transient JTmsTestPlanPath _tmsTestPlan; /** @@ -365,14 +350,6 @@ public JStatisticsFieldPath statisticsField() { return statistics().statisticsField(); } - /** - * Get the implicit many-to-many join path to the - * public.tms_test_case table - */ - public JTmsTestCasePath tmsTestCase() { - return tmsTestCaseLaunch().tmsTestCase(); - } - @Override public JLaunch as(String alias) { return new JLaunch(DSL.name(alias), this); diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsAttachment.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsAttachment.java index 4f1ebb9f8..86d0682a2 100644 --- a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsAttachment.java +++ b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsAttachment.java @@ -13,6 +13,8 @@ import com.epam.ta.reportportal.jooq.tables.JTmsManualScenarioPreconditionsAttachment.JTmsManualScenarioPreconditionsAttachmentPath; import com.epam.ta.reportportal.jooq.tables.JTmsStep.JTmsStepPath; import com.epam.ta.reportportal.jooq.tables.JTmsStepAttachment.JTmsStepAttachmentPath; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionComment.JTmsTestCaseExecutionCommentPath; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionCommentAttachment.JTmsTestCaseExecutionCommentAttachmentPath; import com.epam.ta.reportportal.jooq.tables.JTmsTextManualScenario.JTmsTextManualScenarioPath; import com.epam.ta.reportportal.jooq.tables.JTmsTextManualScenarioAttachment.JTmsTextManualScenarioAttachmentPath; import com.epam.ta.reportportal.jooq.tables.records.JTmsAttachmentRecord; @@ -233,6 +235,19 @@ public JTmsStepAttachmentPath tmsStepAttachment() { return _tmsStepAttachment; } + private transient JTmsTestCaseExecutionCommentAttachmentPath _tmsTestCaseExecutionCommentAttachment; + + /** + * Get the implicit to-many join path to the + * public.tms_test_case_execution_comment_attachment table + */ + public JTmsTestCaseExecutionCommentAttachmentPath tmsTestCaseExecutionCommentAttachment() { + if (_tmsTestCaseExecutionCommentAttachment == null) + _tmsTestCaseExecutionCommentAttachment = new JTmsTestCaseExecutionCommentAttachmentPath(this, null, Keys.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT__TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT_FK_ATTACHMENT.getInverseKey()); + + return _tmsTestCaseExecutionCommentAttachment; + } + private transient JTmsTextManualScenarioAttachmentPath _tmsTextManualScenarioAttachment; /** @@ -262,6 +277,14 @@ public JTmsStepPath tmsStep() { return tmsStepAttachment().tmsStep(); } + /** + * Get the implicit many-to-many join path to the + * public.tms_test_case_execution_comment table + */ + public JTmsTestCaseExecutionCommentPath tmsTestCaseExecutionComment() { + return tmsTestCaseExecutionCommentAttachment().tmsTestCaseExecutionComment(); + } + /** * Get the implicit many-to-many join path to the * public.tms_text_manual_scenario table diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCase.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCase.java index b7167c399..23b1c4576 100644 --- a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCase.java +++ b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCase.java @@ -8,12 +8,9 @@ import com.epam.ta.reportportal.jooq.Indexes; import com.epam.ta.reportportal.jooq.JPublic; import com.epam.ta.reportportal.jooq.Keys; -import com.epam.ta.reportportal.jooq.tables.JLaunch.JLaunchPath; import com.epam.ta.reportportal.jooq.tables.JTmsAttribute.JTmsAttributePath; import com.epam.ta.reportportal.jooq.tables.JTmsDataset.JTmsDatasetPath; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseAttribute.JTmsTestCaseAttributePath; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecution.JTmsTestCaseExecutionPath; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseLaunch.JTmsTestCaseLaunchPath; import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseVersion.JTmsTestCaseVersionPath; import com.epam.ta.reportportal.jooq.tables.JTmsTestFolder.JTmsTestFolderPath; import com.epam.ta.reportportal.jooq.tables.JTmsTestPlan.JTmsTestPlanPath; @@ -246,32 +243,6 @@ public JTmsTestCaseAttributePath tmsTestCaseAttribute() { return _tmsTestCaseAttribute; } - private transient JTmsTestCaseExecutionPath _tmsTestCaseExecution; - - /** - * Get the implicit to-many join path to the - * public.tms_test_case_execution table - */ - public JTmsTestCaseExecutionPath tmsTestCaseExecution() { - if (_tmsTestCaseExecution == null) - _tmsTestCaseExecution = new JTmsTestCaseExecutionPath(this, null, Keys.TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_CASE.getInverseKey()); - - return _tmsTestCaseExecution; - } - - private transient JTmsTestCaseLaunchPath _tmsTestCaseLaunch; - - /** - * Get the implicit to-many join path to the - * public.tms_test_case_launch table - */ - public JTmsTestCaseLaunchPath tmsTestCaseLaunch() { - if (_tmsTestCaseLaunch == null) - _tmsTestCaseLaunch = new JTmsTestCaseLaunchPath(this, null, Keys.TMS_TEST_CASE_LAUNCH__TMS_TEST_CASE_LAUNCH_FK_TEST_CASE.getInverseKey()); - - return _tmsTestCaseLaunch; - } - private transient JTmsTestCaseVersionPath _tmsTestCaseVersion; /** @@ -306,14 +277,6 @@ public JTmsAttributePath tmsAttribute() { return tmsTestCaseAttribute().tmsAttribute(); } - /** - * Get the implicit many-to-many join path to the public.launch - * table - */ - public JLaunchPath launch() { - return tmsTestCaseLaunch().launch(); - } - /** * Get the implicit many-to-many join path to the * public.tms_test_plan table diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseExecution.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseExecution.java index 03fc03d67..e5aa51282 100644 --- a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseExecution.java +++ b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseExecution.java @@ -4,12 +4,10 @@ package com.epam.ta.reportportal.jooq.tables; -import com.epam.ta.reportportal.jooq.Indexes; import com.epam.ta.reportportal.jooq.JPublic; import com.epam.ta.reportportal.jooq.Keys; import com.epam.ta.reportportal.jooq.tables.JTestItem.JTestItemPath; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCase.JTmsTestCasePath; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseVersion.JTmsTestCaseVersionPath; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionComment.JTmsTestCaseExecutionCommentPath; import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseExecutionRecord; import java.util.Arrays; @@ -20,7 +18,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Identity; -import org.jooq.Index; import org.jooq.InverseForeignKey; import org.jooq.JSONB; import org.jooq.Name; @@ -77,11 +74,16 @@ public Class getRecordType() { */ public final TableField TEST_CASE_ID = createField(DSL.name("test_case_id"), SQLDataType.BIGINT.nullable(false), this, ""); + /** + * The column public.tms_test_case_execution.launch_id. + */ + public final TableField LAUNCH_ID = createField(DSL.name("launch_id"), SQLDataType.BIGINT.nullable(false), this, ""); + /** * The column * public.tms_test_case_execution.test_case_version_id. */ - public final TableField TEST_CASE_VERSION_ID = createField(DSL.name("test_case_version_id"), SQLDataType.BIGINT, this, ""); + public final TableField TEST_CASE_VERSION_ID = createField(DSL.name("test_case_version_id"), SQLDataType.BIGINT.nullable(false), this, ""); /** * The column @@ -158,11 +160,6 @@ public Schema getSchema() { return aliased() ? null : JPublic.PUBLIC; } - @Override - public List getIndexes() { - return Arrays.asList(Indexes.IDX_TMS_TEST_CASE_EXECUTION_CASE_ITEM, Indexes.IDX_TMS_TEST_CASE_EXECUTION_SNAPSHOT, Indexes.IDX_TMS_TEST_CASE_EXECUTION_TEST_CASE_ID, Indexes.IDX_TMS_TEST_CASE_EXECUTION_TEST_ITEM_ID, Indexes.IDX_TMS_TEST_CASE_EXECUTION_VERSION_ID); - } - @Override public Identity getIdentity() { return (Identity) super.getIdentity(); @@ -180,33 +177,7 @@ public List> getUniqueKeys() { @Override public List> getReferences() { - return Arrays.asList(Keys.TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_CASE, Keys.TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_CASE_VERSION, Keys.TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_ITEM); - } - - private transient JTmsTestCasePath _tmsTestCase; - - /** - * Get the implicit join path to the public.tms_test_case - * table. - */ - public JTmsTestCasePath tmsTestCase() { - if (_tmsTestCase == null) - _tmsTestCase = new JTmsTestCasePath(this, Keys.TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_CASE, null); - - return _tmsTestCase; - } - - private transient JTmsTestCaseVersionPath _tmsTestCaseVersion; - - /** - * Get the implicit join path to the - * public.tms_test_case_version table. - */ - public JTmsTestCaseVersionPath tmsTestCaseVersion() { - if (_tmsTestCaseVersion == null) - _tmsTestCaseVersion = new JTmsTestCaseVersionPath(this, Keys.TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_CASE_VERSION, null); - - return _tmsTestCaseVersion; + return Arrays.asList(Keys.TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_ITEM); } private transient JTestItemPath _testItem; @@ -221,6 +192,19 @@ public JTestItemPath testItem() { return _testItem; } + private transient JTmsTestCaseExecutionCommentPath _tmsTestCaseExecutionComment; + + /** + * Get the implicit to-many join path to the + * public.tms_test_case_execution_comment table + */ + public JTmsTestCaseExecutionCommentPath tmsTestCaseExecutionComment() { + if (_tmsTestCaseExecutionComment == null) + _tmsTestCaseExecutionComment = new JTmsTestCaseExecutionCommentPath(this, null, Keys.TMS_TEST_CASE_EXECUTION_COMMENT__TMS_TEST_CASE_EXECUTION_COMMENT_FK_EXECUTION.getInverseKey()); + + return _tmsTestCaseExecutionComment; + } + @Override public JTmsTestCaseExecution as(String alias) { return new JTmsTestCaseExecution(DSL.name(alias), this); diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseExecutionComment.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseExecutionComment.java new file mode 100644 index 000000000..e18d0cf63 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseExecutionComment.java @@ -0,0 +1,332 @@ +/* + * This file is generated by jOOQ. + */ +package com.epam.ta.reportportal.jooq.tables; + + +import com.epam.ta.reportportal.jooq.Indexes; +import com.epam.ta.reportportal.jooq.JPublic; +import com.epam.ta.reportportal.jooq.Keys; +import com.epam.ta.reportportal.jooq.tables.JTmsAttachment.JTmsAttachmentPath; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecution.JTmsTestCaseExecutionPath; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionCommentAttachment.JTmsTestCaseExecutionCommentAttachmentPath; +import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseExecutionCommentRecord; + +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + +import org.jooq.Condition; +import org.jooq.Field; +import org.jooq.ForeignKey; +import org.jooq.Identity; +import org.jooq.Index; +import org.jooq.InverseForeignKey; +import org.jooq.Name; +import org.jooq.Path; +import org.jooq.PlainSQL; +import org.jooq.QueryPart; +import org.jooq.Record; +import org.jooq.SQL; +import org.jooq.Schema; +import org.jooq.Select; +import org.jooq.Stringly; +import org.jooq.Table; +import org.jooq.TableField; +import org.jooq.TableOptions; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; +import org.jooq.impl.TableImpl; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) +public class JTmsTestCaseExecutionComment extends TableImpl { + + private static final long serialVersionUID = 1L; + + /** + * The reference instance of + * public.tms_test_case_execution_comment + */ + public static final JTmsTestCaseExecutionComment TMS_TEST_CASE_EXECUTION_COMMENT = new JTmsTestCaseExecutionComment(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return JTmsTestCaseExecutionCommentRecord.class; + } + + /** + * The column public.tms_test_case_execution_comment.id. + */ + public final TableField ID = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false).identity(true), this, ""); + + /** + * The column + * public.tms_test_case_execution_comment.execution_id. + */ + public final TableField EXECUTION_ID = createField(DSL.name("execution_id"), SQLDataType.BIGINT.nullable(false), this, ""); + + /** + * The column public.tms_test_case_execution_comment.comment. + */ + public final TableField COMMENT = createField(DSL.name("comment"), SQLDataType.CLOB, this, ""); + + private JTmsTestCaseExecutionComment(Name alias, Table aliased) { + this(alias, aliased, (Field[]) null, null); + } + + private JTmsTestCaseExecutionComment(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); + } + + /** + * Create an aliased public.tms_test_case_execution_comment + * table reference + */ + public JTmsTestCaseExecutionComment(String alias) { + this(DSL.name(alias), TMS_TEST_CASE_EXECUTION_COMMENT); + } + + /** + * Create an aliased public.tms_test_case_execution_comment + * table reference + */ + public JTmsTestCaseExecutionComment(Name alias) { + this(alias, TMS_TEST_CASE_EXECUTION_COMMENT); + } + + /** + * Create a public.tms_test_case_execution_comment table + * reference + */ + public JTmsTestCaseExecutionComment() { + this(DSL.name("tms_test_case_execution_comment"), null); + } + + public JTmsTestCaseExecutionComment(Table path, ForeignKey childPath, InverseForeignKey parentPath) { + super(path, childPath, parentPath, TMS_TEST_CASE_EXECUTION_COMMENT); + } + + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ + public static class JTmsTestCaseExecutionCommentPath extends JTmsTestCaseExecutionComment implements Path { + + private static final long serialVersionUID = 1L; + public JTmsTestCaseExecutionCommentPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { + super(path, childPath, parentPath); + } + private JTmsTestCaseExecutionCommentPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public JTmsTestCaseExecutionCommentPath as(String alias) { + return new JTmsTestCaseExecutionCommentPath(DSL.name(alias), this); + } + + @Override + public JTmsTestCaseExecutionCommentPath as(Name alias) { + return new JTmsTestCaseExecutionCommentPath(alias, this); + } + + @Override + public JTmsTestCaseExecutionCommentPath as(Table alias) { + return new JTmsTestCaseExecutionCommentPath(alias.getQualifiedName(), this); + } + } + + @Override + public Schema getSchema() { + return aliased() ? null : JPublic.PUBLIC; + } + + @Override + public List getIndexes() { + return Arrays.asList(Indexes.IDX_TMS_TEST_CASE_EXECUTION_COMMENT_EXECUTION_ID); + } + + @Override + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.TMS_TEST_CASE_EXECUTION_COMMENT_PK; + } + + @Override + public List> getUniqueKeys() { + return Arrays.asList(Keys.TMS_TEST_CASE_EXECUTION_COMMENT_EXECUTION_ID_KEY); + } + + @Override + public List> getReferences() { + return Arrays.asList(Keys.TMS_TEST_CASE_EXECUTION_COMMENT__TMS_TEST_CASE_EXECUTION_COMMENT_FK_EXECUTION); + } + + private transient JTmsTestCaseExecutionPath _tmsTestCaseExecution; + + /** + * Get the implicit join path to the + * public.tms_test_case_execution table. + */ + public JTmsTestCaseExecutionPath tmsTestCaseExecution() { + if (_tmsTestCaseExecution == null) + _tmsTestCaseExecution = new JTmsTestCaseExecutionPath(this, Keys.TMS_TEST_CASE_EXECUTION_COMMENT__TMS_TEST_CASE_EXECUTION_COMMENT_FK_EXECUTION, null); + + return _tmsTestCaseExecution; + } + + private transient JTmsTestCaseExecutionCommentAttachmentPath _tmsTestCaseExecutionCommentAttachment; + + /** + * Get the implicit to-many join path to the + * public.tms_test_case_execution_comment_attachment table + */ + public JTmsTestCaseExecutionCommentAttachmentPath tmsTestCaseExecutionCommentAttachment() { + if (_tmsTestCaseExecutionCommentAttachment == null) + _tmsTestCaseExecutionCommentAttachment = new JTmsTestCaseExecutionCommentAttachmentPath(this, null, Keys.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT__TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT_FK_COMMENT.getInverseKey()); + + return _tmsTestCaseExecutionCommentAttachment; + } + + /** + * Get the implicit many-to-many join path to the + * public.tms_attachment table + */ + public JTmsAttachmentPath tmsAttachment() { + return tmsTestCaseExecutionCommentAttachment().tmsAttachment(); + } + + @Override + public JTmsTestCaseExecutionComment as(String alias) { + return new JTmsTestCaseExecutionComment(DSL.name(alias), this); + } + + @Override + public JTmsTestCaseExecutionComment as(Name alias) { + return new JTmsTestCaseExecutionComment(alias, this); + } + + @Override + public JTmsTestCaseExecutionComment as(Table alias) { + return new JTmsTestCaseExecutionComment(alias.getQualifiedName(), this); + } + + /** + * Rename this table + */ + @Override + public JTmsTestCaseExecutionComment rename(String name) { + return new JTmsTestCaseExecutionComment(DSL.name(name), null); + } + + /** + * Rename this table + */ + @Override + public JTmsTestCaseExecutionComment rename(Name name) { + return new JTmsTestCaseExecutionComment(name, null); + } + + /** + * Rename this table + */ + @Override + public JTmsTestCaseExecutionComment rename(Table name) { + return new JTmsTestCaseExecutionComment(name.getQualifiedName(), null); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionComment where(Condition condition) { + return new JTmsTestCaseExecutionComment(getQualifiedName(), aliased() ? this : null, null, condition); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionComment where(Collection conditions) { + return where(DSL.and(conditions)); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionComment where(Condition... conditions) { + return where(DSL.and(conditions)); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionComment where(Field condition) { + return where(DSL.condition(condition)); + } + + /** + * Create an inline derived table from this table + */ + @Override + @PlainSQL + public JTmsTestCaseExecutionComment where(SQL condition) { + return where(DSL.condition(condition)); + } + + /** + * Create an inline derived table from this table + */ + @Override + @PlainSQL + public JTmsTestCaseExecutionComment where(@Stringly.SQL String condition) { + return where(DSL.condition(condition)); + } + + /** + * Create an inline derived table from this table + */ + @Override + @PlainSQL + public JTmsTestCaseExecutionComment where(@Stringly.SQL String condition, Object... binds) { + return where(DSL.condition(condition, binds)); + } + + /** + * Create an inline derived table from this table + */ + @Override + @PlainSQL + public JTmsTestCaseExecutionComment where(@Stringly.SQL String condition, QueryPart... parts) { + return where(DSL.condition(condition, parts)); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionComment whereExists(Select select) { + return where(DSL.exists(select)); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionComment whereNotExists(Select select) { + return where(DSL.notExists(select)); + } +} diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseExecutionCommentAttachment.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseExecutionCommentAttachment.java new file mode 100644 index 000000000..64eac6013 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseExecutionCommentAttachment.java @@ -0,0 +1,318 @@ +/* + * This file is generated by jOOQ. + */ +package com.epam.ta.reportportal.jooq.tables; + + +import com.epam.ta.reportportal.dao.converters.JooqInstantConverter; +import com.epam.ta.reportportal.jooq.Indexes; +import com.epam.ta.reportportal.jooq.JPublic; +import com.epam.ta.reportportal.jooq.Keys; +import com.epam.ta.reportportal.jooq.tables.JTmsAttachment.JTmsAttachmentPath; +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionComment.JTmsTestCaseExecutionCommentPath; +import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseExecutionCommentAttachmentRecord; + +import java.time.Instant; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + +import org.jooq.Condition; +import org.jooq.Field; +import org.jooq.ForeignKey; +import org.jooq.Index; +import org.jooq.InverseForeignKey; +import org.jooq.Name; +import org.jooq.Path; +import org.jooq.PlainSQL; +import org.jooq.QueryPart; +import org.jooq.Record; +import org.jooq.SQL; +import org.jooq.Schema; +import org.jooq.Select; +import org.jooq.Stringly; +import org.jooq.Table; +import org.jooq.TableField; +import org.jooq.TableOptions; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; +import org.jooq.impl.TableImpl; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) +public class JTmsTestCaseExecutionCommentAttachment extends TableImpl { + + private static final long serialVersionUID = 1L; + + /** + * The reference instance of + * public.tms_test_case_execution_comment_attachment + */ + public static final JTmsTestCaseExecutionCommentAttachment TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT = new JTmsTestCaseExecutionCommentAttachment(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return JTmsTestCaseExecutionCommentAttachmentRecord.class; + } + + /** + * The column + * public.tms_test_case_execution_comment_attachment.execution_comment_id. + */ + public final TableField EXECUTION_COMMENT_ID = createField(DSL.name("execution_comment_id"), SQLDataType.BIGINT.nullable(false), this, ""); + + /** + * The column + * public.tms_test_case_execution_comment_attachment.attachment_id. + */ + public final TableField ATTACHMENT_ID = createField(DSL.name("attachment_id"), SQLDataType.BIGINT.nullable(false), this, ""); + + /** + * The column + * public.tms_test_case_execution_comment_attachment.created_at. + */ + public final TableField CREATED_AT = createField(DSL.name("created_at"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, "", new JooqInstantConverter()); + + private JTmsTestCaseExecutionCommentAttachment(Name alias, Table aliased) { + this(alias, aliased, (Field[]) null, null); + } + + private JTmsTestCaseExecutionCommentAttachment(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); + } + + /** + * Create an aliased + * public.tms_test_case_execution_comment_attachment table + * reference + */ + public JTmsTestCaseExecutionCommentAttachment(String alias) { + this(DSL.name(alias), TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT); + } + + /** + * Create an aliased + * public.tms_test_case_execution_comment_attachment table + * reference + */ + public JTmsTestCaseExecutionCommentAttachment(Name alias) { + this(alias, TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT); + } + + /** + * Create a public.tms_test_case_execution_comment_attachment + * table reference + */ + public JTmsTestCaseExecutionCommentAttachment() { + this(DSL.name("tms_test_case_execution_comment_attachment"), null); + } + + public JTmsTestCaseExecutionCommentAttachment(Table path, ForeignKey childPath, InverseForeignKey parentPath) { + super(path, childPath, parentPath, TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT); + } + + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ + public static class JTmsTestCaseExecutionCommentAttachmentPath extends JTmsTestCaseExecutionCommentAttachment implements Path { + + private static final long serialVersionUID = 1L; + public JTmsTestCaseExecutionCommentAttachmentPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { + super(path, childPath, parentPath); + } + private JTmsTestCaseExecutionCommentAttachmentPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public JTmsTestCaseExecutionCommentAttachmentPath as(String alias) { + return new JTmsTestCaseExecutionCommentAttachmentPath(DSL.name(alias), this); + } + + @Override + public JTmsTestCaseExecutionCommentAttachmentPath as(Name alias) { + return new JTmsTestCaseExecutionCommentAttachmentPath(alias, this); + } + + @Override + public JTmsTestCaseExecutionCommentAttachmentPath as(Table alias) { + return new JTmsTestCaseExecutionCommentAttachmentPath(alias.getQualifiedName(), this); + } + } + + @Override + public Schema getSchema() { + return aliased() ? null : JPublic.PUBLIC; + } + + @Override + public List getIndexes() { + return Arrays.asList(Indexes.IDX_TMS_EXECUTION_COMMENT_ATTACHMENT_ATTACHMENT_ID, Indexes.IDX_TMS_EXECUTION_COMMENT_ATTACHMENT_COMMENT_ID); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT_PKEY; + } + + @Override + public List> getReferences() { + return Arrays.asList(Keys.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT__TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT_FK_ATTACHMENT, Keys.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT__TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT_FK_COMMENT); + } + + private transient JTmsAttachmentPath _tmsAttachment; + + /** + * Get the implicit join path to the public.tms_attachment + * table. + */ + public JTmsAttachmentPath tmsAttachment() { + if (_tmsAttachment == null) + _tmsAttachment = new JTmsAttachmentPath(this, Keys.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT__TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT_FK_ATTACHMENT, null); + + return _tmsAttachment; + } + + private transient JTmsTestCaseExecutionCommentPath _tmsTestCaseExecutionComment; + + /** + * Get the implicit join path to the + * public.tms_test_case_execution_comment table. + */ + public JTmsTestCaseExecutionCommentPath tmsTestCaseExecutionComment() { + if (_tmsTestCaseExecutionComment == null) + _tmsTestCaseExecutionComment = new JTmsTestCaseExecutionCommentPath(this, Keys.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT__TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT_FK_COMMENT, null); + + return _tmsTestCaseExecutionComment; + } + + @Override + public JTmsTestCaseExecutionCommentAttachment as(String alias) { + return new JTmsTestCaseExecutionCommentAttachment(DSL.name(alias), this); + } + + @Override + public JTmsTestCaseExecutionCommentAttachment as(Name alias) { + return new JTmsTestCaseExecutionCommentAttachment(alias, this); + } + + @Override + public JTmsTestCaseExecutionCommentAttachment as(Table alias) { + return new JTmsTestCaseExecutionCommentAttachment(alias.getQualifiedName(), this); + } + + /** + * Rename this table + */ + @Override + public JTmsTestCaseExecutionCommentAttachment rename(String name) { + return new JTmsTestCaseExecutionCommentAttachment(DSL.name(name), null); + } + + /** + * Rename this table + */ + @Override + public JTmsTestCaseExecutionCommentAttachment rename(Name name) { + return new JTmsTestCaseExecutionCommentAttachment(name, null); + } + + /** + * Rename this table + */ + @Override + public JTmsTestCaseExecutionCommentAttachment rename(Table name) { + return new JTmsTestCaseExecutionCommentAttachment(name.getQualifiedName(), null); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionCommentAttachment where(Condition condition) { + return new JTmsTestCaseExecutionCommentAttachment(getQualifiedName(), aliased() ? this : null, null, condition); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionCommentAttachment where(Collection conditions) { + return where(DSL.and(conditions)); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionCommentAttachment where(Condition... conditions) { + return where(DSL.and(conditions)); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionCommentAttachment where(Field condition) { + return where(DSL.condition(condition)); + } + + /** + * Create an inline derived table from this table + */ + @Override + @PlainSQL + public JTmsTestCaseExecutionCommentAttachment where(SQL condition) { + return where(DSL.condition(condition)); + } + + /** + * Create an inline derived table from this table + */ + @Override + @PlainSQL + public JTmsTestCaseExecutionCommentAttachment where(@Stringly.SQL String condition) { + return where(DSL.condition(condition)); + } + + /** + * Create an inline derived table from this table + */ + @Override + @PlainSQL + public JTmsTestCaseExecutionCommentAttachment where(@Stringly.SQL String condition, Object... binds) { + return where(DSL.condition(condition, binds)); + } + + /** + * Create an inline derived table from this table + */ + @Override + @PlainSQL + public JTmsTestCaseExecutionCommentAttachment where(@Stringly.SQL String condition, QueryPart... parts) { + return where(DSL.condition(condition, parts)); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionCommentAttachment whereExists(Select select) { + return where(DSL.exists(select)); + } + + /** + * Create an inline derived table from this table + */ + @Override + public JTmsTestCaseExecutionCommentAttachment whereNotExists(Select select) { + return where(DSL.notExists(select)); + } +} diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseLaunch.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseLaunch.java deleted file mode 100644 index 74689aed4..000000000 --- a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseLaunch.java +++ /dev/null @@ -1,303 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package com.epam.ta.reportportal.jooq.tables; - - -import com.epam.ta.reportportal.jooq.Indexes; -import com.epam.ta.reportportal.jooq.JPublic; -import com.epam.ta.reportportal.jooq.Keys; -import com.epam.ta.reportportal.jooq.tables.JLaunch.JLaunchPath; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCase.JTmsTestCasePath; -import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseLaunchRecord; - -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - -import org.jooq.Condition; -import org.jooq.Field; -import org.jooq.ForeignKey; -import org.jooq.Index; -import org.jooq.InverseForeignKey; -import org.jooq.Name; -import org.jooq.Path; -import org.jooq.PlainSQL; -import org.jooq.QueryPart; -import org.jooq.Record; -import org.jooq.SQL; -import org.jooq.Schema; -import org.jooq.Select; -import org.jooq.Stringly; -import org.jooq.Table; -import org.jooq.TableField; -import org.jooq.TableOptions; -import org.jooq.UniqueKey; -import org.jooq.impl.DSL; -import org.jooq.impl.SQLDataType; -import org.jooq.impl.TableImpl; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) -public class JTmsTestCaseLaunch extends TableImpl { - - private static final long serialVersionUID = 1L; - - /** - * The reference instance of public.tms_test_case_launch - */ - public static final JTmsTestCaseLaunch TMS_TEST_CASE_LAUNCH = new JTmsTestCaseLaunch(); - - /** - * The class holding records for this type - */ - @Override - public Class getRecordType() { - return JTmsTestCaseLaunchRecord.class; - } - - /** - * The column public.tms_test_case_launch.test_case_id. - */ - public final TableField TEST_CASE_ID = createField(DSL.name("test_case_id"), SQLDataType.BIGINT.nullable(false), this, ""); - - /** - * The column public.tms_test_case_launch.launch_id. - */ - public final TableField LAUNCH_ID = createField(DSL.name("launch_id"), SQLDataType.BIGINT.nullable(false), this, ""); - - private JTmsTestCaseLaunch(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null, null); - } - - private JTmsTestCaseLaunch(Name alias, Table aliased, Field[] parameters, Condition where) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); - } - - /** - * Create an aliased public.tms_test_case_launch table - * reference - */ - public JTmsTestCaseLaunch(String alias) { - this(DSL.name(alias), TMS_TEST_CASE_LAUNCH); - } - - /** - * Create an aliased public.tms_test_case_launch table - * reference - */ - public JTmsTestCaseLaunch(Name alias) { - this(alias, TMS_TEST_CASE_LAUNCH); - } - - /** - * Create a public.tms_test_case_launch table reference - */ - public JTmsTestCaseLaunch() { - this(DSL.name("tms_test_case_launch"), null); - } - - public JTmsTestCaseLaunch(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath, TMS_TEST_CASE_LAUNCH); - } - - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class JTmsTestCaseLaunchPath extends JTmsTestCaseLaunch implements Path { - - private static final long serialVersionUID = 1L; - public JTmsTestCaseLaunchPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private JTmsTestCaseLaunchPath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public JTmsTestCaseLaunchPath as(String alias) { - return new JTmsTestCaseLaunchPath(DSL.name(alias), this); - } - - @Override - public JTmsTestCaseLaunchPath as(Name alias) { - return new JTmsTestCaseLaunchPath(alias, this); - } - - @Override - public JTmsTestCaseLaunchPath as(Table alias) { - return new JTmsTestCaseLaunchPath(alias.getQualifiedName(), this); - } - } - - @Override - public Schema getSchema() { - return aliased() ? null : JPublic.PUBLIC; - } - - @Override - public List getIndexes() { - return Arrays.asList(Indexes.IDX_TMS_TEST_CASE_LAUNCH_LAUNCH_ID, Indexes.IDX_TMS_TEST_CASE_LAUNCH_TEST_CASE_ID); - } - - @Override - public UniqueKey getPrimaryKey() { - return Keys.TMS_TEST_CASE_LAUNCH_PKEY; - } - - @Override - public List> getReferences() { - return Arrays.asList(Keys.TMS_TEST_CASE_LAUNCH__TMS_TEST_CASE_LAUNCH_FK_LAUNCH, Keys.TMS_TEST_CASE_LAUNCH__TMS_TEST_CASE_LAUNCH_FK_TEST_CASE); - } - - private transient JLaunchPath _launch; - - /** - * Get the implicit join path to the public.launch table. - */ - public JLaunchPath launch() { - if (_launch == null) - _launch = new JLaunchPath(this, Keys.TMS_TEST_CASE_LAUNCH__TMS_TEST_CASE_LAUNCH_FK_LAUNCH, null); - - return _launch; - } - - private transient JTmsTestCasePath _tmsTestCase; - - /** - * Get the implicit join path to the public.tms_test_case - * table. - */ - public JTmsTestCasePath tmsTestCase() { - if (_tmsTestCase == null) - _tmsTestCase = new JTmsTestCasePath(this, Keys.TMS_TEST_CASE_LAUNCH__TMS_TEST_CASE_LAUNCH_FK_TEST_CASE, null); - - return _tmsTestCase; - } - - @Override - public JTmsTestCaseLaunch as(String alias) { - return new JTmsTestCaseLaunch(DSL.name(alias), this); - } - - @Override - public JTmsTestCaseLaunch as(Name alias) { - return new JTmsTestCaseLaunch(alias, this); - } - - @Override - public JTmsTestCaseLaunch as(Table alias) { - return new JTmsTestCaseLaunch(alias.getQualifiedName(), this); - } - - /** - * Rename this table - */ - @Override - public JTmsTestCaseLaunch rename(String name) { - return new JTmsTestCaseLaunch(DSL.name(name), null); - } - - /** - * Rename this table - */ - @Override - public JTmsTestCaseLaunch rename(Name name) { - return new JTmsTestCaseLaunch(name, null); - } - - /** - * Rename this table - */ - @Override - public JTmsTestCaseLaunch rename(Table name) { - return new JTmsTestCaseLaunch(name.getQualifiedName(), null); - } - - /** - * Create an inline derived table from this table - */ - @Override - public JTmsTestCaseLaunch where(Condition condition) { - return new JTmsTestCaseLaunch(getQualifiedName(), aliased() ? this : null, null, condition); - } - - /** - * Create an inline derived table from this table - */ - @Override - public JTmsTestCaseLaunch where(Collection conditions) { - return where(DSL.and(conditions)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public JTmsTestCaseLaunch where(Condition... conditions) { - return where(DSL.and(conditions)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public JTmsTestCaseLaunch where(Field condition) { - return where(DSL.condition(condition)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public JTmsTestCaseLaunch where(SQL condition) { - return where(DSL.condition(condition)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public JTmsTestCaseLaunch where(@Stringly.SQL String condition) { - return where(DSL.condition(condition)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public JTmsTestCaseLaunch where(@Stringly.SQL String condition, Object... binds) { - return where(DSL.condition(condition, binds)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public JTmsTestCaseLaunch where(@Stringly.SQL String condition, QueryPart... parts) { - return where(DSL.condition(condition, parts)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public JTmsTestCaseLaunch whereExists(Select select) { - return where(DSL.exists(select)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public JTmsTestCaseLaunch whereNotExists(Select select) { - return where(DSL.notExists(select)); - } -} diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseVersion.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseVersion.java index a3ea63eba..bb7caa3ff 100644 --- a/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseVersion.java +++ b/src/main/java/com/epam/ta/reportportal/jooq/tables/JTmsTestCaseVersion.java @@ -9,7 +9,6 @@ import com.epam.ta.reportportal.jooq.Keys; import com.epam.ta.reportportal.jooq.tables.JTmsManualScenario.JTmsManualScenarioPath; import com.epam.ta.reportportal.jooq.tables.JTmsTestCase.JTmsTestCasePath; -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecution.JTmsTestCaseExecutionPath; import com.epam.ta.reportportal.jooq.tables.records.JTmsTestCaseVersionRecord; import java.util.Arrays; @@ -201,19 +200,6 @@ public JTmsManualScenarioPath tmsManualScenario() { return _tmsManualScenario; } - private transient JTmsTestCaseExecutionPath _tmsTestCaseExecution; - - /** - * Get the implicit to-many join path to the - * public.tms_test_case_execution table - */ - public JTmsTestCaseExecutionPath tmsTestCaseExecution() { - if (_tmsTestCaseExecution == null) - _tmsTestCaseExecution = new JTmsTestCaseExecutionPath(this, null, Keys.TMS_TEST_CASE_EXECUTION__TMS_TEST_CASE_EXECUTION_FK_TEST_CASE_VERSION.getInverseKey()); - - return _tmsTestCaseExecution; - } - @Override public JTmsTestCaseVersion as(String alias) { return new JTmsTestCaseVersion(DSL.name(alias), this); diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseExecutionCommentAttachmentRecord.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseExecutionCommentAttachmentRecord.java new file mode 100644 index 000000000..589f5aef5 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseExecutionCommentAttachmentRecord.java @@ -0,0 +1,103 @@ +/* + * This file is generated by jOOQ. + */ +package com.epam.ta.reportportal.jooq.tables.records; + + +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionCommentAttachment; + +import java.time.Instant; + +import org.jooq.Record2; +import org.jooq.impl.UpdatableRecordImpl; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) +public class JTmsTestCaseExecutionCommentAttachmentRecord extends UpdatableRecordImpl { + + private static final long serialVersionUID = 1L; + + /** + * Setter for + * public.tms_test_case_execution_comment_attachment.execution_comment_id. + */ + public void setExecutionCommentId(Long value) { + set(0, value); + } + + /** + * Getter for + * public.tms_test_case_execution_comment_attachment.execution_comment_id. + */ + public Long getExecutionCommentId() { + return (Long) get(0); + } + + /** + * Setter for + * public.tms_test_case_execution_comment_attachment.attachment_id. + */ + public void setAttachmentId(Long value) { + set(1, value); + } + + /** + * Getter for + * public.tms_test_case_execution_comment_attachment.attachment_id. + */ + public Long getAttachmentId() { + return (Long) get(1); + } + + /** + * Setter for + * public.tms_test_case_execution_comment_attachment.created_at. + */ + public void setCreatedAt(Instant value) { + set(2, value); + } + + /** + * Getter for + * public.tms_test_case_execution_comment_attachment.created_at. + */ + public Instant getCreatedAt() { + return (Instant) get(2); + } + + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record2 key() { + return (Record2) super.key(); + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + /** + * Create a detached JTmsTestCaseExecutionCommentAttachmentRecord + */ + public JTmsTestCaseExecutionCommentAttachmentRecord() { + super(JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT); + } + + /** + * Create a detached, initialised + * JTmsTestCaseExecutionCommentAttachmentRecord + */ + public JTmsTestCaseExecutionCommentAttachmentRecord(Long executionCommentId, Long attachmentId, Instant createdAt) { + super(JTmsTestCaseExecutionCommentAttachment.TMS_TEST_CASE_EXECUTION_COMMENT_ATTACHMENT); + + setExecutionCommentId(executionCommentId); + setAttachmentId(attachmentId); + setCreatedAt(createdAt); + resetChangedOnNotNull(); + } +} diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseExecutionCommentRecord.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseExecutionCommentRecord.java new file mode 100644 index 000000000..d26ca3274 --- /dev/null +++ b/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseExecutionCommentRecord.java @@ -0,0 +1,96 @@ +/* + * This file is generated by jOOQ. + */ +package com.epam.ta.reportportal.jooq.tables.records; + + +import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseExecutionComment; + +import org.jooq.Record1; +import org.jooq.impl.UpdatableRecordImpl; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) +public class JTmsTestCaseExecutionCommentRecord extends UpdatableRecordImpl { + + private static final long serialVersionUID = 1L; + + /** + * Setter for public.tms_test_case_execution_comment.id. + */ + public void setId(Long value) { + set(0, value); + } + + /** + * Getter for public.tms_test_case_execution_comment.id. + */ + public Long getId() { + return (Long) get(0); + } + + /** + * Setter for + * public.tms_test_case_execution_comment.execution_id. + */ + public void setExecutionId(Long value) { + set(1, value); + } + + /** + * Getter for + * public.tms_test_case_execution_comment.execution_id. + */ + public Long getExecutionId() { + return (Long) get(1); + } + + /** + * Setter for public.tms_test_case_execution_comment.comment. + */ + public void setComment(String value) { + set(2, value); + } + + /** + * Getter for public.tms_test_case_execution_comment.comment. + */ + public String getComment() { + return (String) get(2); + } + + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + /** + * Create a detached JTmsTestCaseExecutionCommentRecord + */ + public JTmsTestCaseExecutionCommentRecord() { + super(JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT); + } + + /** + * Create a detached, initialised JTmsTestCaseExecutionCommentRecord + */ + public JTmsTestCaseExecutionCommentRecord(Long id, Long executionId, String comment) { + super(JTmsTestCaseExecutionComment.TMS_TEST_CASE_EXECUTION_COMMENT); + + setId(id); + setExecutionId(executionId); + setComment(comment); + resetChangedOnNotNull(); + } +} diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseExecutionRecord.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseExecutionRecord.java index b99eddffc..5aa7a077c 100644 --- a/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseExecutionRecord.java +++ b/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseExecutionRecord.java @@ -61,12 +61,26 @@ public Long getTestCaseId() { return (Long) get(2); } + /** + * Setter for public.tms_test_case_execution.launch_id. + */ + public void setLaunchId(Long value) { + set(3, value); + } + + /** + * Getter for public.tms_test_case_execution.launch_id. + */ + public Long getLaunchId() { + return (Long) get(3); + } + /** * Setter for * public.tms_test_case_execution.test_case_version_id. */ public void setTestCaseVersionId(Long value) { - set(3, value); + set(4, value); } /** @@ -74,7 +88,7 @@ public void setTestCaseVersionId(Long value) { * public.tms_test_case_execution.test_case_version_id. */ public Long getTestCaseVersionId() { - return (Long) get(3); + return (Long) get(4); } /** @@ -82,7 +96,7 @@ public Long getTestCaseVersionId() { * public.tms_test_case_execution.test_case_snapshot. */ public void setTestCaseSnapshot(JSONB value) { - set(4, value); + set(5, value); } /** @@ -90,7 +104,7 @@ public void setTestCaseSnapshot(JSONB value) { * public.tms_test_case_execution.test_case_snapshot. */ public JSONB getTestCaseSnapshot() { - return (JSONB) get(4); + return (JSONB) get(5); } // ------------------------------------------------------------------------- @@ -116,12 +130,13 @@ public JTmsTestCaseExecutionRecord() { /** * Create a detached, initialised JTmsTestCaseExecutionRecord */ - public JTmsTestCaseExecutionRecord(Long id, Long testItemId, Long testCaseId, Long testCaseVersionId, JSONB testCaseSnapshot) { + public JTmsTestCaseExecutionRecord(Long id, Long testItemId, Long testCaseId, Long launchId, Long testCaseVersionId, JSONB testCaseSnapshot) { super(JTmsTestCaseExecution.TMS_TEST_CASE_EXECUTION); setId(id); setTestItemId(testItemId); setTestCaseId(testCaseId); + setLaunchId(launchId); setTestCaseVersionId(testCaseVersionId); setTestCaseSnapshot(testCaseSnapshot); resetChangedOnNotNull(); diff --git a/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseLaunchRecord.java b/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseLaunchRecord.java deleted file mode 100644 index 7f6380bbd..000000000 --- a/src/main/java/com/epam/ta/reportportal/jooq/tables/records/JTmsTestCaseLaunchRecord.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package com.epam.ta.reportportal.jooq.tables.records; - - -import com.epam.ta.reportportal.jooq.tables.JTmsTestCaseLaunch; - -import org.jooq.Record2; -import org.jooq.impl.UpdatableRecordImpl; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" }) -public class JTmsTestCaseLaunchRecord extends UpdatableRecordImpl { - - private static final long serialVersionUID = 1L; - - /** - * Setter for public.tms_test_case_launch.test_case_id. - */ - public void setTestCaseId(Long value) { - set(0, value); - } - - /** - * Getter for public.tms_test_case_launch.test_case_id. - */ - public Long getTestCaseId() { - return (Long) get(0); - } - - /** - * Setter for public.tms_test_case_launch.launch_id. - */ - public void setLaunchId(Long value) { - set(1, value); - } - - /** - * Getter for public.tms_test_case_launch.launch_id. - */ - public Long getLaunchId() { - return (Long) get(1); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - @Override - public Record2 key() { - return (Record2) super.key(); - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached JTmsTestCaseLaunchRecord - */ - public JTmsTestCaseLaunchRecord() { - super(JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH); - } - - /** - * Create a detached, initialised JTmsTestCaseLaunchRecord - */ - public JTmsTestCaseLaunchRecord(Long testCaseId, Long launchId) { - super(JTmsTestCaseLaunch.TMS_TEST_CASE_LAUNCH); - - setTestCaseId(testCaseId); - setLaunchId(launchId); - resetChangedOnNotNull(); - } -}