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.Career;
19 import org.kuali.mobility.academics.entity.CareerImpl;
20
21
22
23
24
25 public class CareerTransform implements Transformer {
26
27 @Override
28 public CareerImpl transform( Object obj ) {
29 CareerImpl proxy = null;
30
31 if( obj instanceof CareerImpl ) {
32 proxy = (CareerImpl)obj;
33 } else if( obj instanceof Career ) {
34 proxy = new CareerImpl();
35 proxy.setId( ((Career)obj).getId() );
36 proxy.setDescription( ((Career)obj).getDescription() );
37 proxy.setShortDescription( ((Career)obj).getShortDescription() );
38 proxy.setSubjects( ((Career)obj).getSubjects() );
39 }
40
41 return proxy;
42 }
43 }