1 23 package org.objectweb.medor.optim.jorm; 24 25 import org.objectweb.medor.jorm.TestJormHelper; 26 27 import java.util.ArrayList ; 28 29 32 public abstract class TestJormPDHelper extends TestJormHelper { 33 34 35 public TestJormPDHelper(String testName, String loggerName) { 36 super(testName, loggerName); 37 } 38 39 public Example getExtentOfA() { 40 ArrayList al = new ArrayList (); 41 al.add("org/objectweb/medor/optim/jorm/rdb/A.pd"); 42 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.A"); 43 } 44 45 public Example getExtentOfAgg() { 46 ArrayList al = new ArrayList (); 47 al.add("org/objectweb/medor/optim/jorm/rdb/Agg.pd"); 48 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.Agg"); 49 } 50 51 public Example getExtentOfOne() { 52 ArrayList al = new ArrayList (); 53 al.add("org/objectweb/medor/optim/jorm/rdb/One.pd"); 54 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.One"); 55 } 56 57 public Example getExtentOfB() { 58 ArrayList al = new ArrayList (); 59 al.add("org/objectweb/medor/optim/jorm/rdb/ByteCharCN.pd"); 60 al.add("org/objectweb/medor/optim/jorm/rdb/B.pd"); 61 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.B"); 62 } 63 64 public Example getExtentOfLongLong() { 65 ArrayList al = new ArrayList (); 66 al.add("org/objectweb/medor/optim/jorm/rdb/LongLongCN.pd"); 67 al.add("org/objectweb/medor/optim/jorm/rdb/LongLong.pd"); 68 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.LongLong"); 69 } 70 71 public Example getExtentOfB(String [] fieldnames) { 72 ArrayList al = new ArrayList (); 73 al.add("org/objectweb/medor/optim/jorm/rdb/ByteCharCN.pd"); 74 al.add("org/objectweb/medor/optim/jorm/rdb/B.pd"); 75 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.B", 76 DEFAULT_PNAME_FIELD_NAME, fieldnames); 77 } 78 79 public Example getExtentOfC() { 80 ArrayList al = new ArrayList (); 81 al.add("org/objectweb/medor/optim/jorm/rdb/C.pd"); 82 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.C"); 83 } 84 85 public Example getExtentOfD() { 86 ArrayList al = new ArrayList (); 87 al.add("org/objectweb/medor/optim/jorm/rdb/ByteCharCN.pd"); 88 al.add("org/objectweb/medor/optim/jorm/rdb/D.pd"); 89 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.D"); 90 } 91 92 public Example getExtentOfAcolocB() { 93 ArrayList al = new ArrayList (); 94 al.add("org/objectweb/medor/optim/jorm/rdb/AcolocB.pd"); 95 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.AcolocB"); 96 } 97 98 public Example getExtentOfBcolocC() { 99 ArrayList al = new ArrayList (); 100 al.add("org/objectweb/medor/optim/jorm/rdb/BcolocC.pd"); 101 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.BcolocC"); 102 } 103 104 public Example getExtentOfCcoloc() { 105 ArrayList al = new ArrayList (); 106 al.add("org/objectweb/medor/optim/jorm/rdb/Ccoloc.pd"); 107 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.Ccoloc"); 108 } 109 110 public Example getExtentOfCustomer() { 111 ArrayList al = new ArrayList (); 112 al.add("org/objectweb/medor/optim/jorm/rdb/Customer.pd"); 113 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.Customer"); 114 } 115 116 public Example getExtentOfCruise() { 117 ArrayList al = new ArrayList (); 118 al.add("org/objectweb/medor/optim/jorm/rdb/Cruise.pd"); 119 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.Cruise"); 120 } 121 122 public Example getExtentOfRes() { 123 ArrayList al = new ArrayList (); 124 al.add("org/objectweb/medor/optim/jorm/rdb/Res.pd"); 125 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.Res"); 126 } 127 128 public Example getExtentOfAddress() { 129 ArrayList al = new ArrayList (); 130 al.add("org/objectweb/medor/optim/jorm/rdb/Jt2_Address.pd"); 131 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.Jt2_Address"); 132 } 133 134 public Example getExtentOfAnimal() { 135 ArrayList al = new ArrayList (); 136 al.add("org/objectweb/medor/optim/jorm/rdb/Animal.pd"); 137 al.add("org/objectweb/medor/optim/jorm/rdb/Koala.pd"); 138 al.add("org/objectweb/medor/optim/jorm/rdb/Kangaroo.pd"); 139 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.Animal"); 140 } 141 142 public Example getExtentOfAnimalNF() { 143 ArrayList al = new ArrayList (); 144 al.add("org/objectweb/medor/optim/jorm/rdb/AnimalCName.pd"); 145 al.add("org/objectweb/medor/optim/jorm/rdb/AnimalNF.pd"); 146 al.add("org/objectweb/medor/optim/jorm/rdb/KoalaNF.pd"); 147 al.add("org/objectweb/medor/optim/jorm/rdb/KangarooNF.pd"); 148 return getExtent(al, "org.objectweb.medor.optim.jorm.rdb.AnimalNF"); 149 } 150 151 public Example getRewrittenA() { 152 return getRewritten(getExtentOfA()); 153 } 154 155 public Example getRewrittenOne() { 156 return getRewritten(getExtentOfOne()); 157 } 158 159 public Example getRewrittenB() { 160 return getRewritten(getExtentOfB()); 161 } 162 163 public Example getRewrittenC() { 164 return getRewritten(getExtentOfC()); 165 } 166 167 public Example getRewrittenD() { 168 return getRewritten(getExtentOfD()); 169 } 170 } 171 | Popular Tags |