📄 servicebean.java
字号:
/*$Id: ServiceBean.java,v 1.1 2008/07/15 03:38:23 liqi Exp $ *-------------------------------------- * Apusic (Kingdee Middleware) *--------------------------------------- * Copyright By Apusic ,All right Reserved * author date comment * chenhongxin 2008-4-14 Created*/package org.operamasks.example.ejb.hr.service;import javax.ejb.EJB;import org.operamasks.example.ejb.hr.service.IDepartmentService;import org.operamasks.example.ejb.hr.service.IEmployeeService;import org.operamasks.example.ejb.hr.service.IModuleItemService;import org.operamasks.example.ejb.hr.service.IModuleService;import org.operamasks.example.ejb.hr.service.IRankService;import org.operamasks.example.ejb.hr.service.IRoleService;import org.operamasks.example.ejb.hr.service.ITrainService;import org.operamasks.example.ejb.hr.service.ITrainSubjectService;import org.operamasks.example.ejb.hr.service.ITrainTypeService;import org.operamasks.example.ejb.hr.service.IUserService;import org.operamasks.faces.annotation.ManagedBean;import org.operamasks.faces.annotation.ManagedBeanScope;/** * 简单示例如何通过EJB标注方式注入EJB引用 * @author chenghongxin */@ManagedBean(name = "serviceBean", scope = ManagedBeanScope.SESSION)public class ServiceBean { @EJB(name="org.operamasks.example.ejb.hr.service.DepartmentService") IDepartmentService departmentService; @EJB(name="org.operamasks.example.ejb.hr.service.EmployeeService") IEmployeeService employeeService; @EJB(name="org.operamasks.example.ejb.hr.service.ModuleItemService") IModuleItemService moduleItemService; @EJB(name="org.operamasks.example.ejb.hr.service.ModuleService") IModuleService moduleService; @EJB(name="org.operamasks.example.ejb.hr.service.RankService") IRankService rankService; @EJB(name="org.operamasks.example.ejb.hr.service.RoleService") IRoleService roleService; @EJB(name="org.operamasks.example.ejb.hr.service.TrainService") ITrainService trainService; @EJB(name="org.operamasks.example.ejb.hr.service.TrainSubjectService") ITrainSubjectService trainSubjectService; @EJB(name="org.operamasks.example.ejb.hr.service.TrainTypeService") ITrainTypeService trainTypeService; @EJB(name="org.operamasks.example.ejb.hr.service.UserService") IUserService userService; public IDepartmentService getDepartmentService() { return departmentService; } public IEmployeeService getEmployeeService() { return employeeService; } public IModuleItemService getModuleItemService() { return moduleItemService; } public IModuleService getModuleService() { return moduleService; } public IRankService getRankService() { return rankService; } public IRoleService getRoleService() { return roleService; } public ITrainService getTrainService() { return trainService; } public ITrainSubjectService getTrainSubjectService() { return trainSubjectService; } public ITrainTypeService getTrainTypeService() { return trainTypeService; } public IUserService getUserService() { return userService; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -