private static <T> List<Expression<?>> getGroups(Root<T> root,
			List<String> group) {
		List<Expression<?>> groupRet = new ArrayList<Expression<?>>();
		if (group != null) {
			for (String field : group) {
				try {
					/**
					 * separate field and function
					 */
					String[] splitedfield = field.split(",");
					Path<String> path = getPath(root, splitedfield[0]);
					if (path != null) {
						groupRet.add(path);
					}
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			return groupRet;
		}
		return null;
	}