Class DQLImpl<E extends EntityType>

java.lang.Object
com.hades.builder.sqlCommand.impl.DQLImpl<E>
All Implemented Interfaces:
SQL_DQL<E>, SQLUtils<E>, SQLValidationUtils<E>, Utils<E>

public class DQLImpl<E extends EntityType> extends Object implements SQL_DQL<E>
Author:
alireza_bayat created on 10/19/21
  • Constructor Details

    • DQLImpl

      public DQLImpl()
  • Method Details

    • selectQuery

      public String selectQuery(E e)
      Description copied from interface: SQL_DQL

      generate select query base on fields that got Column in given entity

      Specified by:
      selectQuery in interface SQL_DQL<E extends EntityType>
      Returns:
      string of query
    • selectQuery

      public String selectQuery(E e, String... fieldsName)
      Description copied from interface: SQL_DQL
      first approach is to get fields by Column.name()

      select columns will be generated by String of Varargs.

      each index of varargs must be present in the given entity as parameters Column.name(), otherwise that index will not effect the query

      Specified by:
      selectQuery in interface SQL_DQL<E extends EntityType>
      Parameters:
      fieldsName - varargs of query columns in response
      Returns:
      string of query
    • selectQuery

      public String selectQuery(E e, Selection... selections)
      Specified by:
      selectQuery in interface SQL_DQL<E extends EntityType>
    • selectQuery

      public String selectQuery(E e, ClauseBuilder<E> clauseBuilder)
      Specified by:
      selectQuery in interface SQL_DQL<E extends EntityType>
    • selectQuery

      public String selectQuery(E e, ClauseBuilder<E> clauseBuilder, String... fieldsName)
      Specified by:
      selectQuery in interface SQL_DQL<E extends EntityType>