2017-08-30 10:42
Model 拥有这些功能:
/**
* Remove attributes of this model.
* @param attrs the attribute names of the model
* @return this model
*/
public M remove(String... attrs) {
if (attrs != null)
for (String a : attrs) {
this.attrs.remove(a);
this.getModifyFlag().remove(a);
}
return (M)this;
}
/**
* Keep attributes of this model and remove other attributes.
* @param attrs the attribute names of the model
* @return this model
*/
public M keep(String... attrs) {
if (attrs != null && attrs.length > 0) {
Config config = getConfig();
Map newAttrs = config.containerFactory.getAttrsMap(); // new HashMap(attrs.length);
Set newModifyFlag = config.containerFactory.getModifyFlagSet(); // new HashSet();
for (String a : attrs) {
if (this.attrs.containsKey(a)) // prevent put null value to the newColumns
newAttrs.put(a, this.attrs.get(a));
if (this.getModifyFlag().contains(a))
newModifyFlag.add(a);
}
this.attrs = newAttrs;
this.modifyFlag = newModifyFlag;
}
else {
this.attrs.clear();
this.getModifyFlag().clear();
}
return (M)this;
}
2017-08-04 00:27
public class _TppTest {
public static void main(String[] args) {
String className = "Blog";
String tableName = "blog";
JfGenerator.me
.setPackageBase("com")
.setBasePath("demo")
//.setViewFolder("")
.javaRender(className, tableName)
.htmlRender(className, tableName);
System.out.println("---------OK-刷新一下项目吧---------");
}
}
2017-08-01 11:43
@JFinal 是老大教的好, 在 jfinal俱乐部 待着, 看大神们聊天, 耳濡目染... 自然就能学到几招上乘武功
这个条形码是随手写的.. 只是想给反馈那的小伙伴说明一下, 这个扩展是非常简单的