Interface SQLJoinClause<E extends EntityType>
- All Known Implementing Classes:
JoinClause
public interface SQLJoinClause<E extends EntityType>
- Author:
- alireza_bayat created on 10/30/21
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateInstance(E e) create instanceClassof given entity to be used in Join clausescustomJoin(String customJoin) join(Class<? extends EntityType> referencedClass, String entityKey, String referencedKey, JoinTypes joinTypes) create join clause with passed referenced class.join(Class<? extends EntityType> referencedClass, String entityKey, String referencedKey, JoinTypes joinTypes, SQLFilterClause<E> filterClause) create join clause with passed referenced class.on()
-
Method Details
-
createInstance
create instance
Classof given entity to be used in Join clauses- Returns:
- SQLJoinClause
object
-
on
SQLJoinClause<E> on() -
join
SQLJoinClause<E> join(Class<? extends EntityType> referencedClass, String entityKey, String referencedKey, JoinTypes joinTypes) create join clause with passed referenced class.
entityKey and referencedKey will be used as foreign key to join to tables.
type of join must be passed to the function from
JoinTypessample output:
LEFT JOIN listing_type AS listing_type ON listing.listing_type_id = listing_type.id- Parameters:
referencedClass- entity table class referencedreferencedKey- referenced class key to be used in joinjoinTypes-JoinTypes- Returns:
- SQLJoinClause
-
join
SQLJoinClause<E> join(Class<? extends EntityType> referencedClass, String entityKey, String referencedKey, JoinTypes joinTypes, SQLFilterClause<E> filterClause) create join clause with passed referenced class.
entityKey and referencedKey will be used as foreign key to join to tables.
type of join must be passed to the function from
JoinTypessample output:
LEFT JOIN listing_type AS listing_type ON listing.listing_type_id = listing_type.id AND listing.id != 1000000- Parameters:
referencedClass- entity table class referencedreferencedKey- referenced class key to be used in joinjoinTypes-JoinTypesfilterClause- manage where clause of join- Returns:
- SQLJoinClause
- See Also:
-
customJoin
-