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 Details

    • createInstance

      SQLJoinClause<E> createInstance(E e)

      create instance Class of given entity to be used in Join clauses

      Returns:
      SQLJoinClause object
    • 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 JoinTypes

      sample output:
      LEFT JOIN listing_type AS listing_type ON listing.listing_type_id = listing_type.id

      Parameters:
      referencedClass - entity table class referenced
      referencedKey - referenced class key to be used in join
      joinTypes - 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 JoinTypes

      sample 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 referenced
      referencedKey - referenced class key to be used in join
      joinTypes - JoinTypes
      filterClause - manage where clause of join
      Returns:
      SQLJoinClause
      See Also:
    • customJoin

      SQLJoinClause<E> customJoin(String customJoin)