Đang chuẩn bị liên kết để tải về tài liệu:
Enterprise Java and UML 2nd Edition PHẦN 2

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

10 ChargeCodeEntityBean /** Create a ChargeCodeBean with the specified parameters. This Æ is never called directly. */ public ChargeCodePK ejbCreate(long id, String name, String description, ProjectLocal project) throws CreateException { setId(id); setName(name); setDescription(description); return null; } /** Actions performed after creation. This is never called directly. */ public void ejbPostCreate(long id, String name, String description, ProjectLocal project) { setProject(project); } } ClientEntityBean ClientInt.java ClientInt.java is the local Business interface for the Client entity bean. It defines all of the locally accessible methods for the Client entity bean. package com.wiley.compBooks.EJwithUML.TimeCardDomain; import java.util.*; import javax.ejb.*; /** * The ClientInt is the interface that ties the Bean with. | 10 ChargeCodeEntityBean Create a ChargeCodeBean with the specified parameters. This is never called directly. public ChargeCodePK ejbCreate long id String name String description ProjectLocal project throws CreateException setId id setName name setDescription description return null Actions performed after creation. This is never called directly. public void ejbPostCreate long id String name String description ProjectLocal project setProject project ClientEntityBean ClientInt.java Clientlnt.java is the local Business interface for the Client entity bean. It defines all of the locally accessible methods for the Client entity bean. package com.wiley.compBooks.EJwithUML.TimeCardDomain import java.util. import javax.ejb. The ClientInt is the interface that ties the Bean with the Remote interface to provide compile time type checking. public interface ClientInt Answers the name of this Client. public String getName Answers the description of this Client. public String getDescription Answers all the projects of this Client. 11 12 ClientEntityBean public Collection getProjects ClientLocal.java ClientLocal.java is the local EJB interface for the Client entity bean that inherits from ClientInt. package com.wiley.compBooks.EJwithUML.TimeCardDomain import java.util. import javax.ejb. The Client bean holds descriptive information about a client. ClientLocal is the local interface through which local clients access the underlying entity bean. public interface ClientLocal extends EJBLocalObject ClientInt ClientLocalHome.java ClientLocalHome.java is the Home interface for the Client entity bean. It defines the methods for finding and creating Client entity beans. package com.wiley.compBooks.EJwithUML.TimeCardDomain import java.util. import javax.ejb. The Client bean holds descriptive information about a client. ClientLocalHome is the local interface through which local clients find and create the underlying entity beans. public interface ClientLocalHome extends EJBLocalHome .