Class DtoBlueprint.DtoData<S extends DtoDataSpec>

java.lang.Object
org.litebridge.orm.persistence.DtoBlueprint.DtoData<S>
Type Parameters:
S - The type parameter defining the specification for the DTO data, which must extend DtoDataSpec.
Direct Known Subclasses:
DtoBlueprint.JoinDtoData, DtoBlueprint.SelectDtoData
Enclosing class:
DtoBlueprint

public abstract static sealed class DtoBlueprint.DtoData<S extends DtoDataSpec> extends Object permits DtoBlueprint.SelectDtoData, DtoBlueprint.JoinDtoData
Base class for entity/DTO-specific blueprint data.

This class is designed to be extended by specific implementations such as SelectDtoData and JoinDtoData.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final S
    The specification associated with this data.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Class<?>
    Provides the class type of the Data Transfer Object (DTO) associated with the implementing class.
    Retrieves the list of field-to-column mappings managed by this DTO data instance.
    Retrieves the primary key values associated with this DTO data instance.
    row()
    Retrieves the row associated with this DTO data instance.
    Retrieves the specification associated with this data instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • spec

      protected final S extends DtoDataSpec spec
      The specification associated with this data.
  • Method Details

    • dtoClass

      public abstract Class<?> dtoClass()
      Provides the class type of the Data Transfer Object (DTO) associated with the implementing class.
      Returns:
      The Class object representing the type of the DTO.
    • fieldColumns

      public List<DtoSelectSpec.FieldColumn> fieldColumns()
      Retrieves the list of field-to-column mappings managed by this DTO data instance. Each mapping associates a field accessor with a corresponding database column.
      Returns:
      A list of DtoSelectSpec.FieldColumn objects representing the field-to-column mappings.
    • primaryKey

      public List<Object> primaryKey()
      Retrieves the primary key values associated with this DTO data instance. The primary key is a unique identifier for the data represented by this instance.
      Returns:
      A list of the primary key values.
    • row

      public Row row()
      Retrieves the row associated with this DTO data instance. The row represents the data in the database corresponding to the DTO.
      Returns:
      The Row object representing the database row.
    • spec

      public S spec()
      Retrieves the specification associated with this data instance. The specification defines the structural and functional details for the Data Transfer Object (DTO).
      Returns:
      The specification object of type S associated with this data.