to Domain
Converts a TrackEntity (database entity) into a domain Track object, including its list of Waypoints.
This is used when reading a Track and its waypoints from the database.
Receiver
TrackEntity (Room entity)
Return
Track (domain model)
Parameters
waypoints
List of WaypointEntity objects that belong to this track
Converts a database WaypointEntity into a domain Waypoint object.
This is used when reading waypoints from the database and exposing them to the rest of the app in domain form.
Receiver
WaypointEntity (database entity)
Return
Waypoint (domain model)