Jakarta Persistence (JPA) Method

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


Downcast Root object to the specified type.
Parameters:
type - type to be downcast to
root - root
Returns:
Root object of the specified type.
Since:
Jakarta Persistence (JPA) 2.1