📄 operationmbean.java
字号:
package cn.edu.buaa.ieguam.logmanage.mbeans;
import java.util.HashMap;
import cn.edu.buaa.ieguam.logmanage.MBean;
/**
* MBean for table OPERATION
* @author tongxiaodong
* Creation time:Nov 15, 2006 11:32:27 PM
*/
public class OperationMBean extends MBean{
/**
* 初始化
*/
public void init()
{
this.setPkName("id");
this.setPojoName("operation");
this.setTableName("OPERATION");
this.createOrmMap();
this.createFkmMap();
}
/**
* 创建外键-表实体映射图
*/
public void createFkmMap()
{
if(this.getFkmMap() == null)
{
this.setFkmMap(new HashMap());
}
MBean mBean = new ApplicationMBean();
this.addOneFkm("appId",(ApplicationMBean)mBean,"id");
}
/**
* 创建属性名-SubBean(为属性名-表字段名-字段值的复合数据类型)的映射
*
*/
public void createOrmMap()
{
HashMap ormMap = new HashMap();
MBean.SubBean subBean = null;
String pojoCol = null;
String tableCol = null;
//设置各属性名-表字段名-表字段值的映射,,其中tableCol表属性名设为“数据库表名+字段名”
pojoCol = "id";
tableCol = "OPERATION.ID";
subBean = this.initSubBean(this.getPojoName(),pojoCol,tableCol,null,null);
ormMap.put(pojoCol,subBean);
pojoCol = "appId";
tableCol = "OPERATION.APP_ID";
subBean = this.initSubBean(this.getPojoName(),pojoCol,tableCol,null,null);
ormMap.put(pojoCol,subBean);
pojoCol = "columnName";
tableCol = "OPERATION.COLUMN_NAME";
subBean = this.initSubBean(this.getPojoName(),pojoCol,tableCol,null,null);
ormMap.put(pojoCol,subBean);
pojoCol = "oldValue";
tableCol = "OPERATION.OLD_VALUE";
subBean = this.initSubBean(this.getPojoName(),pojoCol,tableCol,null,null);
ormMap.put(pojoCol,subBean);
pojoCol = "newValue";
tableCol = "OPERATION.NEW_VALUE";
subBean = this.initSubBean(this.getPojoName(),pojoCol,tableCol,null,null);
ormMap.put(pojoCol,subBean);
this.setOrmMap(ormMap);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -