toStore.add(createLocation(storedContigs[0], storedRepeatRegions[0], 1, 572, 607)); toStore.add(createLocation(storedContigs[0], storedRepeatRegions[1], -1, 732, 779));  toStore.add(createLocation(storedContigs[1], storedRepeatRegions[2], 1, 1034, 1078)); toStore.add(createLocation(storedContigs[1], storedRepeatRegions[3], -1, 399, 443));  Iterator iter = toStore.iterator(); osw.beginTransaction(); while (iter.hasNext()) { osw.store((InterMineObject) iter.next()); } for (int i = 0; i<storedExons.length; i++) { osw.store(storedExons[i]); } for (int i = 0; i<storedRepeatRegions.length; i++) { osw.store(storedRepeatRegions[i]); } osw.store(storedContigs[0]); osw.store(storedContigs[1]); osw.store(storedContigs[2]); osw.commitTransaction();
    private void createData() throws Exception {        osw.flushObjectById();        storedContigs[0] =            (Contig) DynamicUtil.createObject(Collections.singleton(Contig.class));        storedContigs[0].setName("contig0");        storedContigs[0].setLength(new Integer(1000));        storedContigs[1] =            (Contig) DynamicUtil.createObject(Collections.singleton(Contig.class));        storedContigs[0].setName("contig1");        storedContigs[0].setLength(new Integer(1500));        storedExons = new Exon [6];        for (int i = 0 ; i < 6 ; i++) {            storedExons[i] = (Exon) DynamicUtil.createObject(Collections.singleton(Exon.class));            storedExons[i].setName("exon" + i);        }        storedExonContigLocations[0] =            createLocation(storedContigs[0], storedExons[0], 1, 120, 140);//         storedExon2ContigLocation =//             (Location) DynamicUtil.createObject(Collections.singleton(SimpleRelation.class));//         storedExon2ContigLocation.setObject(storedContig);//         storedExon2ContigLocation.setSubject(storedExon2);//         Set toStore = new HashSet(Arrays.asList(new Object[] {//                                                     storedContig, storedExon1, storedExon2,//                                                     storedExon1ContigLocation,//                                                     storedExon2ContigLocation,//                                                 }));//         Iterator i = toStore.iterator();//         osw.beginTransaction();//         while (i.hasNext()) {//             osw.store((InterMineObject) i.next());//         }//         osw.commitTransaction();    }