Class SelectEngine

java.lang.Object
org.litebridgedb.orm.engine.SelectEngine
All Implemented Interfaces:
SelectApi

public class SelectEngine extends Object implements SelectApi
  • Constructor Details

  • Method Details

    • select

      public <DTO> DtoFromClauseTerminal<DTO> select(Class<DTO> dtoClass)
      Description copied from interface: SelectApi
      Select a registered Data Transfer Object (DTO) type for database query operations.

      Shortcut method; equivalent to select().from(dtoClass).

      Specified by:
      select in interface SelectApi
      Type Parameters:
      DTO - The type of the DTO to select.
      Parameters:
      dtoClass - The class of the DTO to be queried, which must already be registered.
      Returns:
      A DtoFromClauseTerminal instance for querying and retrieving data for the specified DTO class.
    • select

      public <DTO> DtoFromClauseTerminal<DTO> select(Class<DTO> dtoClass, @Nullable RelatedDtoStrategy relatedDtoStrategy)
      Description copied from interface: SelectApi
      Select a registered Data Transfer Object (DTO) type for database query operations.

      Shortcut method; equivalent to select().from(dtoClass, relatedDtoStrategy).

      Specified by:
      select in interface SelectApi
      Type Parameters:
      DTO - The type of the DTO to select.
      Parameters:
      dtoClass - The class of the DTO to be queried, which must already be registered.
      Returns:
      A DtoFromClauseTerminal instance for querying and retrieving data for the specified DTO class.
    • select

      public <DTO> DtoFromClauseTerminal<DTO> select(Class<DTO> dtoClass, Class<?> contextDtoClass)
      Description copied from interface: SelectApi
      Select a contextually-registered Data Transfer Object (DTO) type for database query operations.

      Shortcut method; equivalent to select().from(dtoClass, contextDtoClass).

      Specified by:
      select in interface SelectApi
      Type Parameters:
      DTO - The type of the DTO to select.
      Parameters:
      dtoClass - The class of the DTO to be queried, which must already be registered.
      Returns:
      A DtoFromClauseTerminal instance for querying and retrieving data for the specified DTO class.
    • select

      public FromClauseStart select(String... fieldsOrColumns)
      Description copied from interface: SelectApi
      Query data from the database, without mapping results to Data Transfer Objects (DTOs).

      Creates a SQL SELECT statement with the specified fields/expressions; the source table is specified via a chained from() call.

      This method constructs a FromClauseStartTypeOverride for further query composition by specifying the target DTO or table for the query.

      Specified by:
      select in interface SelectApi
      Parameters:
      fieldsOrColumns - An array of field/column names to be included in the SELECT statement, dependent on whether a DTO or raw SQL is selected in the chained from() call. Each field/column name must be a valid, non-null string.
      Returns:
      A FromClauseStartTypeOverride instance allowing further refinement of the SQL query by specifying the target DTO or table.
    • select

      public FromClauseStart select(ExpressionSpec... expressions)
      Description copied from interface: SelectApi
      Query data from the database, without mapping results to Data Transfer Objects (DTOs).

      Creates a SQL SELECT statement with the specified fields/expressions; the source table is specified via a chained from() call.

      This method constructs a FromClauseStartTypeOverride for further query composition by specifying the target DTO or table for the query.

      Specified by:
      select in interface SelectApi
      Parameters:
      expressions - An array of ExpressionSpec objects representing the expressions to be part of the SELECT statement.
      Returns:
      A FromClauseStartTypeOverride instance allowing further refinement of the SQL query by specifying the target DTO or table.
    • select

      public <T> FromClauseStartTypeOverride<T> select(TypeOverride<T> expression)
      Description copied from interface: SelectApi
      Query data from the database, without mapping results to Data Transfer Objects (DTOs).

      Creates a SQL SELECT statement with the specified fields/expressions; the source table is specified via a chained from() call.

      This method constructs a FromClauseStartTypeOverride for further query composition by specifying the target DTO or table for the query.

      Specified by:
      select in interface SelectApi
      Type Parameters:
      T - The return type of the query
      Parameters:
      expression - Return type-overriding expression
      Returns:
      A FromClauseStartTypeOverride instance allowing further refinement of the SQL query by specifying the target DTO or table.
    • select

      public FromClauseStart select()
      Description copied from interface: SelectApi
      Query data from the database, without mapping results to Data Transfer Object (DTOs).

      Creates a SQL SELECT statement with all fields/expressions. The source table is specified via a chained from() call.

      This method constructs a FromClauseStartTypeOverride for further query composition by specifying the target DTO or table for the query.

      Specified by:
      select in interface SelectApi
      Returns:
      A FromClauseStartTypeOverride instance allowing further refinement of the SQL query by specifying the target DTO or table.