JPA Methodin javax.persistence.criteria.CriteriaBuilderRoot<T> treat( Root<X> root, Class<T> type) Downcast Root object to the specified type. Parameters:root - roottype - type to be downcast toReturn: Root object of the specified typeSince:JPA 2.1