View Javadoc

1   /*
2    * Created on 30.04.2005 from Linke
3    *
4    */
5   package test.crispy;
6   
7   import java.util.LinkedList;
8   
9   import net.sf.crispy.impl.ServiceManager;
10  import net.sf.crispy.util.Converter;
11  import net.sf.crispy.util.Util;
12  import test.crispy.example.model.DataTransferObject;
13  
14  
15  
16  /**
17   * This is a Main-Test-Class only for the developer.
18   * <b>The class must not be possibile to execute!</b>
19   * 
20   * @author Linke
21   * 
22   */
23  public class Run  {
24  
25  	
26  	public static void main(String[] args) {
27  		System.out.println("START");
28  		Util.initJdkLogger();
29  
30  		ServiceManager.DEBUG_MODE_ON = true;
31  		
32  		
33  //		try {
34  //			Kunde k1 = new Kunde("k1");
35  //			System.out.println("VORHER: " + k1.getCollection());
36  //			
37  //			Converter c = new Converter();
38  //			Object o = c.makeSimple(k1);
39  //			System.out.println("SIMPLE: " + o);
40  //			
41  //			Kunde kAfter = (Kunde) c.makeComplex(o);
42  //			System.out.println("DANACH: " + kAfter.getCollection());			
43  //		} catch (Exception e) {
44  //			e.printStackTrace();
45  //		}
46  		
47  		
48  		Converter lvConverter = new Converter("NULL!!!!jhgfjhvjhdgfkjhgfdhjfdgfdjgh");
49  		DataTransferObject lvDataTransferObject = new DataTransferObject();
50  		LinkedList lvLinkedList = new LinkedList();
51  		lvDataTransferObject.setReturnObject(lvLinkedList);
52  		lvDataTransferObject.setParams(lvLinkedList);
53  //		lvDataTransferObject.setParams(new LinkedList());
54  		lvDataTransferObject.setParamtypes(null);
55  		try {
56  			Object lvObject = lvConverter.makeSimple(lvDataTransferObject);
57  			Object lvObject2 = lvConverter.makeComplex(lvObject);
58  			DataTransferObject lvDataTransferObject2 = (DataTransferObject)lvObject2;
59  			System.out.println(lvDataTransferObject2.getReturnObject());
60  		} catch (Exception e) {
61  			e.printStackTrace();
62  		}
63  
64  	}
65  		
66  }