Search in sources :

Example 6 with Role

use of com.autentia.tnt.businessobject.Role in project TNTConcept by autentia.

the class UserBean method getRoles.

// Getters to list possible values of related entities
/**
 * Get the list of all roles
 *
 * @return the list of all roles
 */
public List<SelectItem> getRoles() {
    List<Role> refs = RoleManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    for (Role ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    return ret;
}
Also used : Role(com.autentia.tnt.businessobject.Role) SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Aggregations

Role (com.autentia.tnt.businessobject.Role)6 RoleDAO (com.autentia.tnt.dao.hibernate.RoleDAO)4 SortCriteria (com.autentia.tnt.dao.SortCriteria)2 ArrayList (java.util.ArrayList)2 SelectItem (javax.faces.model.SelectItem)2 Department (com.autentia.tnt.businessobject.Department)1 OfferRole (com.autentia.tnt.businessobject.OfferRole)1 ProjectRole (com.autentia.tnt.businessobject.ProjectRole)1 User (com.autentia.tnt.businessobject.User)1 UserCategory (com.autentia.tnt.businessobject.UserCategory)1 WorkingAgreement (com.autentia.tnt.businessobject.WorkingAgreement)1 ContactDAO (com.autentia.tnt.dao.hibernate.ContactDAO)1 DepartmentDAO (com.autentia.tnt.dao.hibernate.DepartmentDAO)1 OfferDAO (com.autentia.tnt.dao.hibernate.OfferDAO)1 OrganizationDAO (com.autentia.tnt.dao.hibernate.OrganizationDAO)1 ProjectDAO (com.autentia.tnt.dao.hibernate.ProjectDAO)1 UserCategoryDAO (com.autentia.tnt.dao.hibernate.UserCategoryDAO)1 UserDAO (com.autentia.tnt.dao.hibernate.UserDAO)1 WorkingAgreementDAO (com.autentia.tnt.dao.hibernate.WorkingAgreementDAO)1 Date (java.util.Date)1