public void transfor(){
		log.info("获取数据库结构：");
		List<Map<String, Object>> tls = DBUtil.getDBModel();	
		try {
			//配置转换引擎
			Configuration freemarkerCfg = new Configuration();
			freemarkerCfg.setDirectoryForTemplateLoading(new File("tpl"));
			freemarkerCfg.setEncoding(Locale.getDefault(), "UTF-8");
			//转换配置文件
			Template template = freemarkerCfg.getTemplate(PropUtil.getMTemplet());
			File genfile = new File(PropUtil.getMGenFile());
			if(!genfile.getParentFile().exists()){
				genfile.getParentFile().mkdirs();
			}
			if(!genfile.exists()){				
				genfile.createNewFile();
			}
			Map<String, Object> modm = new HashMap<String, Object>();
			modm.put("tables", tls);
			Writer out = new BufferedWriter(new OutputStreamWriter(
					new FileOutputStream(genfile), "UTF-8"));
			template.process(modm, out);
			out.flush();
			log.info("生成文件："+genfile.getAbsolutePath());
			//转换页面及代码
			for (int i = 0; i < tls.size(); i++) {
				Map<String, Object> table = tls.get(i);
				String tblname = table.get("_model").toString();
				log.info("转换"+table.get("_name")+"对象.....");
				Map<String, String> fls = PropUtil.getParseList(tblname);
				Iterator<Entry<String, String>> iter = fls.entrySet().iterator(); 
				while (iter.hasNext()) {
					Map.Entry entry = (Map.Entry) iter.next(); 
				    String key = entry.getKey().toString(); 
				    String val = entry.getValue().toString(); 
				    template = freemarkerCfg.getTemplate(key);
					template.setEncoding("UTF-8");
					genfile = new File(val);
					if(!genfile.getParentFile().exists()){
						genfile.getParentFile().mkdirs();
					}
					if(!genfile.exists()){				
						genfile.createNewFile();
					}
					out = new BufferedWriter(new OutputStreamWriter(
							new FileOutputStream(genfile), "UTF-8"));
					template.process(table, out);
					out.flush();
					log.info("生成文件："+genfile.getAbsolutePath());
				} 
			}
		}catch (Exception e) {
			log.error("we got some problem in transfer model!!!!!");
			e.printStackTrace();
		}		
	}