Class DtoSelectSpec

java.lang.Object
org.litebridge.orm.api.select.model.SelectSpec
org.litebridge.orm.api.dto.DtoSelectSpec
All Implemented Interfaces:
DtoDataSpec

public final class DtoSelectSpec extends SelectSpec implements DtoDataSpec
Specification for a DTO select query.
  • Constructor Details

    • DtoSelectSpec

      public DtoSelectSpec(Class<?> dtoClass, OrmTable dtoTable, AliasGenerator aliasGenerator, LitebridgeContext litebridgeContext, @Nullable Class<?> typeOverride)
      Creates a new DtoSelectSpec.
      Parameters:
      dtoClass - the DTO class
      dtoTable - the DTO table
      aliasGenerator - the alias generator
      litebridgeContext - the litebridge context
      typeOverride - the type override
    • DtoSelectSpec

      public DtoSelectSpec(Class<?> dtoClass, OrmTable dtoTable, AliasGenerator aliasGenerator, LitebridgeContext litebridgeContext)
      Creates a new DtoSelectSpec without type override.
      Parameters:
      dtoClass - the DTO class
      dtoTable - the DTO table
      aliasGenerator - the alias generator
      litebridgeContext - the litebridge context
  • Method Details

    • dtoClass

      public Class<?> dtoClass()
      Returns the DTO class.
      Returns:
      the DTO class
    • dtoTable

      public OrmTable dtoTable()
      Description copied from interface: DtoDataSpec
      Returns the ORM table metadata for the DTO.
      Specified by:
      dtoTable in interface DtoDataSpec
      Returns:
      the ORM table metadata
    • typeOverride

      public @Nullable Class<?> typeOverride()
      Returns the type override.
      Returns:
      the type override, or null if none
    • newJoinSpec

      public DtoJoinSpec newJoinSpec(Class<?> dtoClass, OrmTable ormTable, Table table)
      Creates a new join specification.
      Parameters:
      dtoClass - the DTO class to join
      ormTable - the ORM table to join
      table - the database table to join
      Returns:
      the new join specification
    • newJoinSpecBefore

      public DtoJoinSpec newJoinSpecBefore(DtoJoinSpec other, Class<?> dtoClass, OrmTable ormTable, Table table)
      Creates a new join specification before another join specification.
      Parameters:
      other - the join specification to insert before
      dtoClass - the DTO class to join
      ormTable - the ORM table to join
      table - the database table to join
      Returns:
      the new join specification
    • createSelectFieldSpecs

      public List<ExpressionSpec> createSelectFieldSpecs(String[] fields)
      Creates select field specifications for the given fields.
      Parameters:
      fields - the field names
      Returns:
      the list of expression specifications