Java Code Examples for com.jfinal.kit.Kv#set()
The following examples show how to use
com.jfinal.kit.Kv#set() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: _JFCodeGenerator.java From sdb-mall with Apache License 2.0 | 6 votes |
public TableMeta getTableMeta(String tableName) { if (tablemetaMap == null) { DataSource dataSource = _JFinalGenerator.getDataSource(); MetaBuilder metaBuilder = new MetaBuilder(dataSource); metaBuilder.setDialect(new MysqlDialect()); metaBuilder.addExcludedTable(_JFinalGenerator.excludedTable); List<TableMeta> tableMetas = metaBuilder.build(); new DataGenerator(dataSource, null).rebuildColumnMetas(tableMetas); if (tableMetas.size() == 0) { System.out.println("TableMeta 数量为 0,不生成任何文件"); return null; } Kv kv = Kv.create(); for (TableMeta tableMeta : tableMetas) { kv.set(tableMeta.name, tableMeta); } tablemetaMap = kv; } return (TableMeta) tablemetaMap.get(tableName); }
Example 2
Source File: AppJbootServiceImplGenerator.java From jboot-admin with Apache License 2.0 | 5 votes |
@Override protected void genBaseModelContent(TableMeta tableMeta) { Kv data = Kv.by("serviceImplPackageName", baseModelPackageName); data.set("generateChainSetter", generateChainSetter); data.set("tableMeta", tableMeta); data.set("basePackage", servicePackage); data.set("modelPackage", modelPacket); Engine engine = Engine.use("forServiceImpl"); tableMeta.baseModelContent = engine.getTemplate(template).renderToString(data); }
Example 3
Source File: JbootServiceImplGenerator.java From jboot with Apache License 2.0 | 5 votes |
protected void genBaseModelContent(TableMeta tableMeta) { Kv data = Kv.by("serviceImplPackageName", basePackage + "." + implName); // data.set("generateChainSetter", generateChainSetter); data.set("tableMeta", tableMeta); data.set("basePackage", basePackage); data.set("modelPackage", modelPackage); data.set("implName", implName); Engine engine = Engine.use("forServiceImpl"); tableMeta.baseModelContent = engine.getTemplate(template).renderToString(data); }
Example 4
Source File: JbootServiceInterfaceGenerator.java From jboot with Apache License 2.0 | 5 votes |
@Override protected void genBaseModelContent(TableMeta tableMeta) { Kv data = Kv.by("baseModelPackageName", baseModelPackageName); data.set("generateChainSetter", generateChainSetter); data.set("tableMeta", tableMeta); data.set("modelPacket", modelPacket); data.set("basePackage", basePackage); Engine engine = Engine.use("forService"); tableMeta.baseModelContent = engine.getTemplate(template).renderToString(data); }
Example 5
Source File: ServiceApiGenerator.java From jpress with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected void genBaseModelContent(TableMeta tableMeta) { Kv data = Kv.by("baseModelPackageName", baseModelPackageName); data.set("generateChainSetter", generateChainSetter); data.set("tableMeta", tableMeta); data.set("modelPacket", modelPacket); data.set("basePackage", basePackage); Engine engine = Engine.use("forService"); tableMeta.baseModelContent = engine.getTemplate(template).renderToString(data); }
Example 6
Source File: ServiceProviderGenerator.java From jpress with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected void genBaseModelContent(TableMeta tableMeta) { Kv data = Kv.by("serviceImplPackageName", baseModelPackageName); data.set("generateChainSetter", generateChainSetter); data.set("tableMeta", tableMeta); data.set("basePackage", basePackage); data.set("modelPackage", modelPackage); Engine engine = Engine.use("forServiceImpl"); tableMeta.baseModelContent = engine.getTemplate(template).renderToString(data); }