Code snippet for Company Entity Bean public class CompanyBean implements EntityBean { EntityContext entityContext; public Integer comId; //the PRimary key public String comName; //the company name public String comDescription //basic description public Timestamp mutationDate //eXPlained later public Integer ejbCreate(<params>) throws CreateException { return null; } //various get() and set() for every column/field // which are exposed in the Remote Interface as well
Code snippet for Employee Entity Bean public class EmployeeBean implements EntityBean { EntityContext entityContext; public Integer empId; //the primary key public Integer comId; //the company foreign key public String empFirstName; //the employee firstname public String empLastName // the employee lastname public Timestamp mutationDate //explained later public Integer ejbCreate(<params>) throws CreateException { return null; } //various get() and set() for every column/field // which are exposed in the Remote Interface as well