org.appfuse.service.impl.LookupManagerImpl Maven / Gradle / Ivy
package org.appfuse.service.impl;
import org.appfuse.dao.LookupDao;
import org.appfuse.model.LabelValue;
import org.appfuse.model.Role;
import org.appfuse.service.LookupManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* Implementation of LookupManager interface to talk to the persistence layer.
*
* @author Matt Raible
*/
@Service("lookupManager")
public class LookupManagerImpl implements LookupManager {
@Autowired
LookupDao dao;
/**
* {@inheritDoc}
*/
public List getAllRoles() {
List roles = dao.getRoles();
List list = new ArrayList();
for (Role role1 : roles) {
list.add(new LabelValue(role1.getName(), role1.getName()));
}
return list;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy