标签: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();
标签:style blog color os art cti
原文地址:http://www.cnblogs.com/qizhelongdeyang/p/3824461.html