Skip to content

Commit 176af3e

Browse files
committed
Update javadoc for updateTestPlanAttributes method
- Document the complete replacement behavior of the method - Explain the clearing of existing attributes collection to prevent Hibernate conflicts - Clarify handling of empty/null attributes parameter
1 parent 9659e38 commit 176af3e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/com/epam/ta/reportportal/core/tms/service/TmsTestPlanAttributeService.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ public interface TmsTestPlanAttributeService {
88

99
void createTestPlanAttributes(TmsTestPlan tmsTestPlan, List<TmsTestPlanAttributeRQ> attributes);
1010

11+
/**
12+
* Updates test plan attributes by completely replacing existing attributes with new ones.
13+
* This method first deletes all existing attributes and then creates new ones.
14+
*
15+
* Note: This method clears the existing attributes collection from the test plan entity
16+
* to prevent Hibernate session conflicts when attributes with the same attributeId
17+
* are being replaced.
18+
*
19+
* @param existingTestPlan The test plan to update attributes for.
20+
* @param attributes The new list of attributes to set. If empty or null,
21+
* all existing attributes will be removed.
22+
*/
1123
void updateTestPlanAttributes(TmsTestPlan existingTestPlan,
1224
List<TmsTestPlanAttributeRQ> attributes);
1325

0 commit comments

Comments
 (0)