(BuildingObjectDao) context.getBean("buildingObjectDao");
final RegionDao regionDao =
(RegionDao) context.getBean("regionDao");
final ConstructionExampleDao csamplesDao =
(ConstructionExampleDao) context.getBean("constructionExampleDao");
PlatformTransactionManager txManager =
(PlatformTransactionManager) context.getBean("txManager");
new TransactionTemplate(txManager).execute(new TransactionCallback() {
@Override
public Object doInTransaction(TransactionStatus arg0) {
long start = System.currentTimeMillis();
List<?> rlist = regionDao.getObjects();
List<?> blist = buildingDao.getBuildingObjectsForTree();
System.out.println(rlist);
System.out.println(blist);
for (Object o : blist){
BuildingObject bo = (BuildingObject) o;
List<?> clist =
buildingDao.getConstructionTypesForTree(bo.getObjectId());
System.out.println(bo);
System.out.println(clist);
for (Object c: clist){
ObjectConstruction ct = (ObjectConstruction) c;
List<?> samplelist =
csamplesDao.getConstructionExamplesLite("" + ct.getTypeId(), "tree");
System.out.println(samplelist);
}
}