1 21 package com.db4o.test.legacy.soda.experiments; 22 23 import java.util.*; 24 25 import com.db4o.query.*; 26 import com.db4o.test.legacy.soda.*; 27 import com.db4o.test.legacy.soda.collections.*; 28 29 30 public class STCurrent implements STClass { 31 32 public static transient SodaTest st; 33 34 SodaTest pm; 35 36 String mystr; 37 38 public STCurrent() { 39 } 40 41 public STCurrent(String str) { 42 this.mystr = str; 43 } 44 45 public String toString() { 46 return "STCurrent: " + mystr; 47 } 48 49 public Object [] store() { 50 return new Object [] { 51 new STVectorEU(new Object [] { new Integer (17)}), 52 new STVectorEU( 53 new Object [] { 54 new Integer (3), 55 new Integer (17), 56 new Integer (25), 57 new Integer (Integer.MAX_VALUE - 2)}), 58 new STVectorT(new Object [] { new Integer (17)}), 59 new STVectorU( 60 new Object [] { 61 new Integer (3), 62 new Integer (17), 63 new Integer (25), 64 new Integer (Integer.MAX_VALUE - 2)}), 65 }; 66 } 67 68 public void testDescendOne() { 69 Query q = st.query(); 70 Object [] r = store(); 71 q.constrain(STVectorEU.class); 72 q.descend("col").constrain(new Integer (17)); 73 st.expect(q, new Object [] { r[0] }); 74 } 75 76 88 116 } 117 118 class Employee { 119 String name; 120 Float salary; 121 Department dept; 122 Employee boss; 123 } 124 125 class Department { 126 String name; 127 Collection emps; 128 Department() { 129 } 130 Department(String name) { 131 } 132 } 133 | Popular Tags |