码迷,mamicode.com
首页 > 其他好文 > 详细

ADF中VO的删除操作初探

时间:2014-07-06 22:40:26      阅读:281      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   os   art   cti   

在ADF的VO中,真实提交更改是在commit 方法执行之后,如以下增加操作

EntityDefImpl departmentEODef = DepartmentEOImpl. getDefinitionObject();
//Create the entiy instance in the current transaction
DepartmentEOImpl newDept1 =
(DepartmentEOImpl)departmentEODef.
createInstance2(this.getDBTransaction(), null);

在此,以下调用

newDept1.getPostState();    //将返回   NEW
newDept1.getEntityState();  //将返回   NEW

getDBTransaction().postChanges();

后,

newDept1.getPostState();     //将返回UNMODIFIED
newDept1.getEntityState();   //将返回NEW

在getDBTransaction().commit();操作后,以下操作将都返回UNMODIFIED

newDept1.getPostState();
newDept1.getEntityState();

 

ADF中VO的删除操作初探,布布扣,bubuko.com

ADF中VO的删除操作初探

标签:style   blog   color   os   art   cti   

原文地址:http://www.cnblogs.com/qizhelongdeyang/p/3824461.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!