- Type Parameters:
T- the type of the table being queried.R- the type of the result.ID- the type of the primary key.
- All Known Subinterfaces:
TypedJoinBuilder<T,R, ID>
public interface JoinBuilder<T extends Data,R,ID>
JoinBuilder relies on preview features of the Java platform:
JoinBuilderrefers to one or more preview APIs:StringTemplate.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A builder for specifying the ON condition of a JOIN clause using a custom string template expression.
JoinBuilder is returned by the join methods on QueryBuilder that accept a StringTemplatePREVIEW
or a subquery. It provides a single on(StringTemplate)PREVIEW method to specify the join condition.
Example
List<User> users = userRepository
.select()
.innerJoin(RAW."\{Order.class}", "o")
.on(RAW."\{User_.id} = o.user_id")
.getResultList();
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionQueryBuilder<T, R, ID> on(StringTemplatePREVIEW template) Specifies the join condition using a custom expression.
-
Method Details
-
on
Specifies the join condition using a custom expression.- Parameters:
template- the condition to join on.- Returns:
- the query builder.
-
JoinBuilderwhen preview features are enabled.