Package eja.ejb.entities

Examples of eja.ejb.entities.UserRole


        if (this._user.getRoles() == null)
            return false;

        for (String role : roles) {
            UserRole urole = new UserRole();
            urole.setName(role);
            result = this._user.getRoles().contains(urole);

            if (result)
                break;
        }
View Full Code Here


    public Collection<UserRole> getAllRoles() {
        return this._roleDao.getAllRoles();
    }

    public String edit() {
        this._role = (this.id != 0) ? this._roleDao.getRoleById(this.id) : new UserRole();
        this._role.setName(this.name);
        this._role.setDescription(this.description);;

        this._roleDao.saveRole(this._role);
        return "role-details";
View Full Code Here

public class RoleConverter implements Converter {


    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        UserRole role = new UserRole();
        role.setName(value);
       
        return role;
    }
View Full Code Here

        return role;
    }

    @Override
    public String getAsString(FacesContext context, UIComponent component, Object value) {
        UserRole role = (UserRole) value;
        return role.getName().toString();
    }
View Full Code Here

TOP

Related Classes of eja.ejb.entities.UserRole

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.