1 21 package com.db4o.test.legacy.soda.classes.untypedhierarchy; 23 import com.db4o.query.*; 24 import com.db4o.test.legacy.soda.*; 25 import com.db4o.test.legacy.soda.engines.db4o.*; 26 27 42 public class STInnerClasses implements STClass 43 { 44 45 public static transient SodaTest st; 46 47 public class Parent 48 { 49 public Object child; 50 public Parent(Object o) { child = o; } 51 public String toString() { return "Parent[" + child + "]"; } 52 public Parent() {} 53 } 54 55 56 public class FirstClass 57 { 58 public Object childFirst; 59 public FirstClass(Object o ) { childFirst = o; } 60 public String toString() { return "First[" + childFirst + "]"; } 61 public FirstClass() {} 62 } 63 64 public STInnerClasses () 65 { 66 } 67 68 public Object [] store() { 69 return new Object [] 70 { 71 new Parent(new FirstClass("Example")), 72 new Parent(new FirstClass("no Example")), 73 }; 74 } 75 76 79 public void testNothing() 80 { 81 Query q = st.query(); 82 Query q2 = q.descend("child"); 83 Object [] r = store(); 84 st.expect(q, r); 85 } 87 88 91 public static void main(String [] params) 92 { 93 new SodaTest().run(new STClass[] { new STInnerClasses()}, new STEngine[] {new STDb4o()}, false); 94 95 } 96 97 98 99 } | Popular Tags |