| 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 |  |   | 
  | 12 | 0 |  public class AtpMaintainbleImpl extends KualiMaintainableImpl { | 
  | 13 |  |          private static final long serialVersionUID = 9026116304410006845L; | 
  | 14 |  |   | 
  | 15 |  |           | 
  | 16 |  |   | 
  | 17 |  |   | 
  | 18 |  |          @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 | 0 |                  } | 
  | 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 | 0 |                  } | 
  | 43 |  |                   | 
  | 44 | 0 |                  AtpRichText description = atp.getDescription(); | 
  | 45 | 0 |                  if (description != null) { | 
  | 46 | 0 |                          description.setId(null); | 
  | 47 | 0 |                          atp.setDescriptionId(null); | 
  | 48 |  |                  } | 
  | 49 | 0 |          } | 
  | 50 |  |   | 
  | 51 |  |  } |