Class FromClauseStart<ReturnType>

java.lang.Object
org.litebridge.orm.api.select.impl.DelegatingSelectTerminal<ReturnType>
org.litebridge.orm.api.select.FromClauseStart<ReturnType>
All Implemented Interfaces:
SelectTerminal<ReturnType>

public final class FromClauseStart<ReturnType> extends DelegatingSelectTerminal<ReturnType>
Entry point for the "FROM" clause of a query.
  • Constructor Details

    • FromClauseStart

      public FromClauseStart(ExpressionSpec[] expressionSpecs, SelectEngineTerminal selectEngineTerminal, Function<LitebridgeContext.Mode,LitebridgeContext> litebridgeContextCreator)
      Creates a new FromClauseStart instance with expression specifications.
      Parameters:
      expressionSpecs - the expression specifications
      selectEngineTerminal - the terminal select engine
      litebridgeContextCreator - the context creator function
    • FromClauseStart

      public FromClauseStart(String[] columns, SelectEngineTerminal selectEngineTerminal, Function<LitebridgeContext.Mode,LitebridgeContext> litebridgeContextCreator)
      Creates a new FromClauseStart instance with column names.
      Parameters:
      columns - the column names
      selectEngineTerminal - the terminal select engine
      litebridgeContextCreator - the context creator function
    • FromClauseStart

      public FromClauseStart(SelectEngineTerminal selectEngineTerminal, Function<LitebridgeContext.Mode,LitebridgeContext> litebridgeContextCreator)
      Creates a new FromClauseStart instance.
      Parameters:
      selectEngineTerminal - the terminal select engine
      litebridgeContextCreator - the context creator function
  • Method Details

    • from

      public <DTO> DtoFromClauseTerminal<DTO> from(Class<DTO> dtoClass)
      Starts a FROM clause for the given DTO class.
      Type Parameters:
      DTO - the DTO type.
      Parameters:
      dtoClass - the DTO class.
      Returns:
      the DTO from clause terminal.
    • from

      public <DTO> DtoFromClauseTerminal<DTO> from(DtoAliasSpec<DTO> aliasedDtoClass)
    • from

      public <DTO> DtoFromClauseTerminal<DTO> from(Class<DTO> dtoClass, Class<?> contextDtoClass)
      Starts a FROM clause for the given DTO class within the context of another DTO class.
      Type Parameters:
      DTO - the DTO type.
      Parameters:
      dtoClass - the DTO class.
      contextDtoClass - the context DTO class.
      Returns:
      the DTO from clause terminal.
    • from

      public SqlFromClauseTerminal<ReturnType> from(String table)
      Starts a FROM clause for the given SQL table.
      Parameters:
      table - the table name.
      Returns:
      the SQL from clause terminal.
    • from

      public SqlFromClauseTerminal<ReturnType> from(SqlFromTargetSpec fromTargetSpec)
    • from

      Specifies a subquery to use as the merge source.
      Parameters:
      query - function building the subquery
      Returns:
      the merge ON condition clause terminal