| 1 |
|
package org.kuali.student.core.atp.document; |
| 2 |
|
|
| 3 |
|
import java.util.Map; |
| 4 |
|
|
| 5 |
|
import org.kuali.rice.kns.document.MaintenanceDocument; |
| 6 |
|
import org.kuali.rice.kns.maintenance.KualiMaintainableImpl; |
| 7 |
|
import org.kuali.student.core.atp.bo.Atp; |
| 8 |
|
import org.kuali.student.core.atp.bo.AtpRichText; |
| 9 |
|
import org.kuali.student.core.atp.bo.DateRange; |
| 10 |
|
import org.kuali.student.core.atp.bo.Milestone; |
| 11 |
|
|
|
|
|
| 0% |
Uncovered Elements: 25 (25) |
Complexity: 4 |
Complexity Density: 0.22 |
|
| 12 |
|
public class AtpMaintainbleImpl extends KualiMaintainableImpl { |
| 13 |
|
private static final long serialVersionUID = 9026116304410006845L; |
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
|
|
|
| 0% |
Uncovered Elements: 24 (24) |
Complexity: 4 |
Complexity Density: 0.22 |
|
| 18 |
0
|
@Override... |
| 19 |
|
public void processAfterCopy(MaintenanceDocument document, Map<String, String[]> parms) { |
| 20 |
0
|
super.processAfterCopy(document, parms); |
| 21 |
|
|
| 22 |
0
|
Atp atp = (Atp) document.getNewMaintainableObject().getBusinessObject(); |
| 23 |
|
|
| 24 |
0
|
for (DateRange dateRange : atp.getDateRanges()) { |
| 25 |
0
|
dateRange.setId(null); |
| 26 |
|
|
| 27 |
0
|
AtpRichText description = dateRange.getDescription(); |
| 28 |
0
|
if (description != null) { |
| 29 |
0
|
description.setId(null); |
| 30 |
0
|
dateRange.setDescriptionId(null); |
| 31 |
|
} |
| 32 |
|
} |
| 33 |
|
|
| 34 |
0
|
for (Milestone milestone : atp.getMilestones()) { |
| 35 |
0
|
milestone.setId(null); |
| 36 |
|
|
| 37 |
0
|
AtpRichText description = milestone.getDescription(); |
| 38 |
0
|
if (description != null) { |
| 39 |
0
|
description.setId(null); |
| 40 |
0
|
milestone.setDescriptionId(null); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
| 44 |
0
|
AtpRichText description = atp.getDescription(); |
| 45 |
0
|
if (description != null) { |
| 46 |
0
|
description.setId(null); |
| 47 |
0
|
atp.setDescriptionId(null); |
| 48 |
|
} |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
} |