Path<?> path = root.get(mt.getSingularAttribute(item.getProperty()));
Direction direction = item.getDirection();
if (direction == Direction.ASC) {
orderList.add(cb.asc(path));
} else if (direction == Direction.DESC) {
orderList.add(cb.desc(path));
} else if (direction == Direction.ASC_TRUNC) {
orderList.add(cb.asc(cb.function("trunc", Path.class, path)));
} else if (direction == Direction.DESC_TRUNC) {
orderList.add(cb.desc(cb.function("trunc", Path.class, path)));
}