在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();

 

相关文章:

  • 2021-10-11
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2023-02-22
  • 2021-05-16
  • 2022-01-01
  • 2021-06-12
猜你喜欢
  • 2021-07-04
  • 2021-06-27
  • 2021-09-20
  • 2021-07-14
  • 2021-04-22
  • 2022-12-23
  • 2021-11-21
相关资源
相似解决方案