Search in sources :

Example 6 with VXPortalUserList

use of org.apache.ranger.view.VXPortalUserList in project ranger by apache.

the class UserServiceBase method searchUsers.

/**
 * @param searchCriteria
 * @return
 */
public VXPortalUserList searchUsers(SearchCriteria searchCriteria) {
    VXPortalUserList returnList = new VXPortalUserList();
    List<VXPortalUser> userList = new ArrayList<VXPortalUser>();
    List<T> resultList = searchResources(searchCriteria, searchFields, sortFields, returnList);
    // Iterate over the result list and create the return list
    for (T gjUser : resultList) {
        VXPortalUser vUser = populateViewBean(gjUser);
        userList.add(vUser);
    }
    returnList.setVXPortalUsers(userList);
    return returnList;
}
Also used : VXPortalUserList(org.apache.ranger.view.VXPortalUserList) ArrayList(java.util.ArrayList) VXPortalUser(org.apache.ranger.view.VXPortalUser)

Aggregations

VXPortalUserList (org.apache.ranger.view.VXPortalUserList)6 ArrayList (java.util.ArrayList)5 VXPortalUser (org.apache.ranger.view.VXPortalUser)4 Query (javax.persistence.Query)3 SearchCriteria (org.apache.ranger.common.SearchCriteria)3 Test (org.junit.Test)3 EntityManager (javax.persistence.EntityManager)2 XXPortalUser (org.apache.ranger.entity.XXPortalUser)2 List (java.util.List)1 SortField (org.apache.ranger.common.SortField)1 VXString (org.apache.ranger.view.VXString)1