public Map generateSource(StoreDesc sdesc, List<Map> entities) throws Exception { String namespace = sdesc.getNamespace(); String pack = sdesc.getPack(); if (entities == null) { entities = getEntities(sdesc); } printList("\n----> generateSource.entities(" + namespace + "," + pack + "):", entities); File outDir = new File(sdesc.getBaseDir(), "/src"); List<String> srcFiles = m_sourceGenService.generate(sdesc, entities, outDir.toString()); Map retMap = new HashMap(); retMap.put(SOURCES, srcFiles); retMap.put(ENTITIES, entities); return retMap; }
public void createClasses(StoreDesc sdesc) throws Exception { String namespace = sdesc.getNamespace(); String pack = sdesc.getPack(); List<Map> entities = getEntities(sdesc); File outDir = new File(sdesc.getBaseDir(), "classes"); ClassLoader clParent = Thread.currentThread().getContextClassLoader(); List<String> classFiles = null; try { // BundleDelegatingClassLoader bdc = new BundleDelegatingClassLoader(m_bc.getBundle(), // clParent); // Thread.currentThread().setContextClassLoader(bdc); classFiles = m_classGenService.generate(sdesc, entities, outDir.toString()); } finally { Thread.currentThread().setContextClassLoader(clParent); } enhance(sdesc, entities, classFiles); }