idRightCond.setExpression("Giuseppe V%");
SearchCond searchCondition = SearchCond.getOrCond(
SearchCond.getLeafCond(usernameLeafCond), SearchCond.getLeafCond(idRightCond));
List<OrderByClause> orderByClauses = new ArrayList<OrderByClause>();
OrderByClause orderByClause = new OrderByClause();
orderByClause.setField("username");
orderByClause.setDirection(OrderByClause.Direction.DESC);
orderByClauses.add(orderByClause);
orderByClause = new OrderByClause();
orderByClause.setField("fullname");
orderByClause.setDirection(OrderByClause.Direction.ASC);
orderByClauses.add(orderByClause);
List<SyncopeUser> users = searchDAO.search(EntitlementUtil.getRoleIds(entitlementDAO.findAll()),
searchCondition, Collections.singletonList(orderByClause),
SubjectType.USER);