Package org.apache.openjpa.jdbc.sql
Interface Joins
- All Known Implementing Classes:
SelectImpl
,SelectImpl.SelectResult
public interface Joins
Tracks joins made when traversing relations in a select.
- Author:
- Abe White
-
Method Summary
Modifier and TypeMethodDescriptionPerform a cross join on the given tables.Return correlated variable nameboolean
isEmpty()
Whether we have any joins.boolean
isOuter()
Whether this joins path results in outer joins.join
(ForeignKey fk, boolean inverse, boolean toMany) Join the columns of the given foreign key.joinRelation
(String name, ForeignKey fk, ClassMapping target, int subclasses, boolean inverse, boolean toMany) Join the columns of the given foreign key, which represents a relation via the given field name.void
Move joins that belong to subquery's parentouterJoin
(ForeignKey fk, boolean inverse, boolean toMany) Join the columns of the given foreign key.outerJoinRelation
(String name, ForeignKey fk, ClassMapping target, int subclasses, boolean inverse, boolean toMany) Join the columns of the given foreign key, which represents a relation via the given field name.Set the correlated variable name being traversed into with the next join.setJoinContext
(Context context) Set subquery context when traversing into the next join is in transition from parent context to subquery.setSubselect
(String alias) Set the subquery alias.setVariable
(String var) Set the variable name being traversed into with the next join.
-
Method Details
-
isEmpty
boolean isEmpty()Whether we have any joins. -
isOuter
boolean isOuter()Whether this joins path results in outer joins. -
crossJoin
Perform a cross join on the given tables. -
join
Join the columns of the given foreign key. -
outerJoin
Join the columns of the given foreign key. -
joinRelation
Joins joinRelation(String name, ForeignKey fk, ClassMapping target, int subclasses, boolean inverse, boolean toMany) Join the columns of the given foreign key, which represents a relation via the given field name. -
outerJoinRelation
Joins outerJoinRelation(String name, ForeignKey fk, ClassMapping target, int subclasses, boolean inverse, boolean toMany) Join the columns of the given foreign key, which represents a relation via the given field name. -
setVariable
Set the variable name being traversed into with the next join. -
setSubselect
Set the subquery alias. -
setJoinContext
Set subquery context when traversing into the next join is in transition from parent context to subquery.- Parameters:
context
-
-
moveJoinsToParent
void moveJoinsToParent()Move joins that belong to subquery's parent
-