正在加载图片...
编写 Entity Bean类(Part2) //Part1 public String ejbCreate(String state Code, float taxR throws CreateEXceptiont ejbPostCreate if(state Code ==null throw new CreateExceptio 编写在 Entity bean时 每个home接口中的 Icreate还要对 this state code= state Code 应一个 ejbPostcreate方法 this. taxRate taxRate return null public void ejbPostCreate(String state Code, float taxRate) public void ejbLoadot if(state Code != null state Code. trimo } public void ejbstoreot public void ejbRemove0t public void unsetEntity Contextot public void setEntity Context(Entity Context context)t public void ejbActivateot ublic void ejbPassivate(仆 }编写Entity Bean类(Part 2) //Part1 public String ejbCreate(String stateCode, float taxRate) throws CreateException{ if(stateCode == null){ throw new CreateException("The State Code is required."); } this.stateCode = stateCode; this.taxRate = taxRate; return null; } public void ejbPostCreate(String stateCode, float taxRate){} public void ejbLoad(){ if(stateCode != null) stateCode.trim(); } public void ejbStore() {} public void ejbRemove() {} public void unsetEntityContext() {} public void setEntityContext(EntityContext context) {} public void ejbActivate() {} public void ejbPassivate() {} } ejbPostCreate: 编写在Entity bean时, 每个home接口中的create还要对 应一个ejbPostCreate方法
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有