lookupmanagerimpl.java
来自「基于Maven的质量保证自动化环境配置和演示程序」· Java 代码 · 共 43 行
JAVA
43 行
package com.cib.service.impl;import com.cib.dao.LookupDao;import com.cib.model.LabelValue;import com.cib.model.Role;import com.cib.service.LookupManager;import java.util.ArrayList;import java.util.List;/** * Implementation of LookupManager interface to talk to the persistence layer. * * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a> */public class LookupManagerImpl extends UniversalManagerImpl implements LookupManager { private LookupDao dao; /** * Method that allows setting the DAO to talk to the data store with. * @param dao the dao implementation */ public void setLookupDao(LookupDao dao) { super.dao = dao; this.dao = dao; } /** * {@inheritDoc} */ public List<LabelValue> getAllRoles() { List<Role> roles = dao.getRoles(); List<LabelValue> list = new ArrayList<LabelValue>(); for (Role role1 : roles) { list.add(new LabelValue(role1.getName(), role1.getName())); } return list; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?