Class JoinClause<E extends EntityType>
java.lang.Object
com.hades.builder.sqlCommand.clauseBuilder.ClauseElements
com.hades.builder.sqlCommand.clauseBuilder.join.JoinClause<E>
- All Implemented Interfaces:
SQLJoinClause<E>
- Author:
- alireza_bayat created on 10/30/21
-
Field Summary
Fields inherited from class com.hades.builder.sqlCommand.clauseBuilder.ClauseElements
clause -
Constructor Summary
Constructors -
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()Methods inherited from class com.hades.builder.sqlCommand.clauseBuilder.ClauseElements
getClause, setClause
-
Constructor Details
-
JoinClause
-
JoinClause
public JoinClause()
-
-
Method Details
-
createInstance
Description copied from interface:SQLJoinClausecreate instance
Classof given entity to be used in Join clauses- Specified by:
createInstancein interfaceSQLJoinClause<E extends EntityType>- Returns:
- SQLJoinClause
object
-
on
- Specified by:
onin interfaceSQLJoinClause<E extends EntityType>
-
join
public JoinClause<E> join(Class<? extends EntityType> referencedClass, String entityKey, String referencedKey, JoinTypes joinTypes) Description copied from interface:SQLJoinClausecreate 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- Specified by:
joinin interfaceSQLJoinClause<E extends EntityType>- Parameters:
referencedClass- entity table class referencedreferencedKey- referenced class key to be used in joinjoinTypes-JoinTypes- Returns:
- SQLJoinClause
-
join
public SQLJoinClause<E> join(Class<? extends EntityType> referencedClass, String entityKey, String referencedKey, JoinTypes joinTypes, SQLFilterClause<E> filterClause) Description copied from interface:SQLJoinClausecreate 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- Specified by:
joinin interfaceSQLJoinClause<E extends EntityType>- 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
- Specified by:
customJoinin interfaceSQLJoinClause<E extends EntityType>
-