The graphic shows three classes and the methods in the classes:
Methods in the EmployeeBenefitManager session bean (stateless):
addNewBenefit(Long benefitId, String benefitName, String benefitDescription) : void
countEnrollmentsForBenefit(long benefitId) : int {Remote}
employeeCount() : int {Remote}
listBenefits() : BenefitModel[] {Remote}
listBenefitsOfEmployee(long employeeId) : BenefitModel[] {Remote}
create() : EmployeeBenefitManager {Home}
Fields and methods in the Employee entity bean, a container-managed bean:
benefits : Collection {CmrField, Local}
commissionPercentage : Long {CmpField, Local}
departmentId: Long {CmpField, Local}
create() : Employee {LocalHome}
employeeCount() : int {localHome}
findAll() : Collection {LocalHome}
Fields and methods in the Benefit entity bean, a container-managed bean:
benefitId : Long {CmpField, PkField, Local}
description : String {CmpField, Local}
employees : Collection {CmrField, Local}
create() : Benefit {LocalHome}
create(Long benefitId, String name) : Benefit {LocalHome}
findAll() : Collection {LocalHome}
The Employee and the Benefit entity beans have a many-to-many relationship: an Employee can have zero or more Benefits, and a Benefit can be enrolled in by zero or more Employees.