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.CatalogNumber;
19 import org.kuali.mobility.academics.entity.CatalogNumberImpl;
20
21
22
23
24
25 public class CatalogNumberTransform implements Transformer {
26
27 @Override
28 public CatalogNumberImpl transform( Object obj ) {
29 CatalogNumberImpl proxy = null;
30
31 if( obj instanceof CatalogNumberImpl ) {
32 proxy = (CatalogNumberImpl)obj;
33 } else if( obj instanceof CatalogNumber ) {
34 proxy = new CatalogNumberImpl();
35 proxy.setNumber( ((CatalogNumber)obj).getNumber() );
36 proxy.setDescription( ((CatalogNumber)obj).getDescription() );
37 proxy.setSections( ((CatalogNumber)obj).getSections() );
38 }
39 return proxy;
40 }
41 }