1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.kuali.mobility.academics.util;
16
17 import org.apache.commons.collections.Transformer;
18 import org.kuali.mobility.academics.entity.Section;
19 import org.kuali.mobility.academics.entity.SectionImpl;
20
21
22
23
24
25 public class SectionTransform implements Transformer {
26
27 @Override
28 public SectionImpl transform( Object obj ) {
29 SectionImpl proxy = null;
30
31 if( obj instanceof SectionImpl ) {
32 proxy = (SectionImpl)obj;
33 proxy.setSectionUID(null);
34 } else if( obj instanceof Section ) {
35 proxy = new SectionImpl();
36 proxy.setAvailableSeats( ((Section)obj).getAvailableSeats() );
37 proxy.setClassTopic( ((Section)obj).getClassTopic() );
38 proxy.setCourseDescription(((Section)obj).getCourseDescription());
39 proxy.setAdditionalInfo(((Section)obj).getAdditionalInfo());
40 proxy.setCombinedSectionId( ((Section)obj).getCombinedSectionId() );
41 proxy.setCreditHours( ((Section)obj).getCreditHours() );
42 proxy.setEnrollmentCapacity( ((Section)obj).getEnrollmentCapacity() );
43 proxy.setEnrollmentStatus( ((Section)obj).getEnrollmentStatus() );
44 proxy.setEnrollmentTotal( ((Section)obj).getEnrollmentTotal() );
45 proxy.setNumber( ((Section)obj).getNumber() );
46 proxy.setSessionDescription( ((Section)obj).getSessionDescription() );
47 proxy.setType( ((Section)obj).getType() );
48 proxy.setTypeDescription( ((Section)obj).getTypeDescription() );
49 proxy.setWaitCapacity( ((Section)obj).getWaitCapacity() );
50 proxy.setWaitTotal( ((Section)obj).getWaitTotal() );
51 proxy.setTermId( ((Section)obj).getTermId() );
52 proxy.setCatalogNumber( ((Section)obj).getCatalogNumber() );
53 proxy.setSubjectId( ((Section)obj).getSubjectId() );
54 proxy.setMeetings( ((Section)obj).getMeetings() );
55
56 proxy.setSectionUID(null);
57 }
58 return proxy;
59 }
60 }