org.omnifaces.persistence.service.SubQueryRoot Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of omnipersistence Show documentation
Show all versions of omnipersistence Show documentation
Utilities for JPA, JDBC and DataSources
package org.omnifaces.persistence.service;
import javax.persistence.criteria.Fetch;
import javax.persistence.criteria.Join;
import javax.persistence.criteria.Root;
/**
* Fetch joins are not supported in subqueries, so delegate to normal joins.
*/
class SubQueryRoot extends RootWrapper {
public SubQueryRoot(Root wrapped) {
super(wrapped);
}
@Override
@SuppressWarnings({ "unchecked", "hiding" })
public Fetch fetch(String attributeName) {
Join join = join(attributeName);
return join instanceof Fetch ? (Fetch) join : new JoinFetchAdapter<>(join);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy