JPA Method
in javax.persistence.criteria.CriteriaBuilder

Root<T> treat(
  Root<X> root, 
  Class<T> type
)


Downcast Root object to the specified type.
Parameters:
root - root
type - type to be downcast to
Return:
Root object of the specified type
Since:
JPA 2.1