Class RaceMapper

java.lang.Object
com.endurancetrio.business.event.mapper.RaceMapper

@Component public class RaceMapper extends Object
  • Constructor Details

    • RaceMapper

      public RaceMapper()
  • Method Details

    • map

      public RaceDTO map(Race entity)
      Maps a Race entity to a RaceDTO.
      Parameters:
      entity - the Race entity to be mapped
      Returns:
      the corresponding RaceDTO, or null if the entity is null
    • mapWithEvent

      public RaceDTO mapWithEvent(Race entity)
      Maps a Race entity to a RaceDTO including the parent Event data.

      Unlike map(Race), this method navigates through the race's courses to populate the RaceDTO.event() field with the associated Event information.

      Parameters:
      entity - the Race entity to be mapped
      Returns:
      the corresponding RaceDTO with event data, or null if the entity is null