Package cz.encircled.joiner.query.join
Class J
- java.lang.Object
-
- cz.encircled.joiner.query.join.J
-
-
Constructor Summary
Constructors Constructor Description J()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JoinDescriptioninner(com.querydsl.core.types.dsl.CollectionPathBase<?,?,?> path)Add inner join for givenpathstatic JoinDescriptioninner(com.querydsl.core.types.EntityPath<?> path)Add inner join for givenpathstatic JoinDescriptionleft(com.querydsl.core.types.dsl.CollectionPathBase<?,?,?> path)Add left join for givenpathstatic JoinDescriptionleft(com.querydsl.core.types.EntityPath<?> path)Add left join for givenpathstatic <P extends com.querydsl.core.types.dsl.SimpleExpression<?>,T extends com.querydsl.core.types.EntityPath<P>>
Ppath(com.querydsl.core.types.dsl.CollectionPathBase<?,?,P> path)Aliases of nested joins are determined at runtime.static <T extends com.querydsl.core.types.EntityPath<?>>
Tpath(com.querydsl.core.types.EntityPath<?> grandFather, com.querydsl.core.types.EntityPath<?> father, T path)Aliases of nested joins are determined at runtime.static <T extends com.querydsl.core.types.EntityPath<?>>
Tpath(com.querydsl.core.types.EntityPath<?> parent, T path)Aliases of nested joins are determined at runtime.static JoinDescriptionright(com.querydsl.core.types.EntityPath<?> path)Add right join for givenpathstatic List<JoinDescription>unrollChildrenJoins(Collection<JoinDescription> joins)Collect all joins and its children to single collection
-
-
-
Method Detail
-
path
public static <P extends com.querydsl.core.types.dsl.SimpleExpression<?>,T extends com.querydsl.core.types.EntityPath<P>> P path(com.querydsl.core.types.dsl.CollectionPathBase<?,?,P> path)
Aliases of nested joins are determined at runtime. To refer a nested join, this method should be used to get a correct alias. For example, there is a query
To refer aQ.from(QGroup.group).joins(J.left(QPerson.person).nested(J.left(QContact.contact)))Contactentity in the 'where' clause, one should useJ.path(QPerson.person.contacts).number.eq(12345)- Type Parameters:
T- any entity path- Parameters:
path- path on parent entity- Returns:
- entity path with correct alias
-
path
public static <T extends com.querydsl.core.types.EntityPath<?>> T path(com.querydsl.core.types.EntityPath<?> parent, T path)Aliases of nested joins are determined at runtime. To refer a nested join, this method should be used to get a correct alias. For example, there is a query
To refer aQ.from(QGroup.group).joins(J.left(QPerson.person).nested(J.left(QContact.contact)))Contactentity in the 'where' clause, one should useJ.path(QPerson.person, QContact.contact).number.eq(12345)- Type Parameters:
T- any entity path- Parameters:
parent- parent join pathpath- target join path- Returns:
- entity path with correct alias
-
path
public static <T extends com.querydsl.core.types.EntityPath<?>> T path(com.querydsl.core.types.EntityPath<?> grandFather, com.querydsl.core.types.EntityPath<?> father, T path)Aliases of nested joins are determined at runtime. To refer a nested join, this method should be used to get a correct alias. For example, there is a query
To refer aQ.from(QGroup.group).joins(J.left(QPerson.person).nested(J.left(QContact.contact).nested(QStatus.status)))Statusentity in the 'where' clause, one should useJ.path(QPerson.person, QContact.contact. QStatus.status).state.eq("active")- Type Parameters:
T- any entity path- Parameters:
grandFather- parent of parent join pathfather- parent join pathpath- target join path- Returns:
- entity path with correct alias
-
left
public static JoinDescription left(com.querydsl.core.types.EntityPath<?> path)
Add left join for givenpath- Parameters:
path- alias of object to be joined- Returns:
- join description
-
right
public static JoinDescription right(com.querydsl.core.types.EntityPath<?> path)
Add right join for givenpath- Parameters:
path- alias of object to be joined- Returns:
- join description
-
left
public static JoinDescription left(com.querydsl.core.types.dsl.CollectionPathBase<?,?,?> path)
Add left join for givenpath- Parameters:
path- path to an object to be joined- Returns:
- join description
-
inner
public static JoinDescription inner(com.querydsl.core.types.EntityPath<?> path)
Add inner join for givenpath- Parameters:
path- alias of object to be joined- Returns:
- join description
-
inner
public static JoinDescription inner(com.querydsl.core.types.dsl.CollectionPathBase<?,?,?> path)
Add inner join for givenpath- Parameters:
path- path to an object to be joined- Returns:
- join description
-
unrollChildrenJoins
public static List<JoinDescription> unrollChildrenJoins(Collection<JoinDescription> joins)
Collect all joins and its children to single collection- Parameters:
joins- root joins- Returns:
- all joins, including children
-
-