Jupiter.Market.Elastic.Comparables.Mappers.DealDataMapper
Maps comparable property data and deal references into a consolidated domain model for indexing and downstream processing.
Methods
#ctor
Initializes a new instance of the class.
Parameters:
- logger: The logger instance for diagnostic output.
MapFromComparables
Maps a and a list of s into a single object, prioritizing registered sales, quoting prices, and leases.
Ordering Comparables: Comparables are ordered by ComparableStatus (RegisteredSale first), then by DataSource priority, and finally by most recent DealDate.
Deal Price Extraction Logic: See the detailed conceptual article: . If any comparables are leases (IsLease == true): DealPrice is taken from the first lease comparable with a non-null DealPrice. PremiumPrice and IsPremium are also extracted from the first lease comparable with those values.
If there are no lease comparables, DealPrice is taken from the first ordered comparable with a non-null DealPrice. IndexedPrice is always taken from the first ordered comparable with a non-null DealPrice. TotalFloorAreaInSquareFeet and SiteAreaInSquareFeet are taken from quoting comparables first, then from sale comparables if not present. NumberOfUnits is taken from the first ordered comparable with a non-null value.
Derived fields (DealPricePerSquareFoot, DealPricePerAcre, DealPricePerUnit) are calculated from the above values if available.
This prioritization ensures that lease comparables take precedence for lease deals, while registered sales and quoting prices are used for other deal types, following business rules for data reliability.
Additional fields such as DealAddress, CountryIsoCode, UseClasses, BuiltYears, and Floors are aggregated from the comparables as appropriate.
Parameters:
- dealReference: The reference information for the deal.
- comparables: A list of comparable property records to aggregate.
Returns: A populated instance representing the mapped deal, or a minimal object if no comparables are provided.
CalculateDealPricePerSquareFoot
No summary available.
Parameters:
- dealPrice: The total deal price.
- totalFloorAreaInSquareFeet: The total floor area in square feet.
CalculateDealPricePerAcre
No summary available.
Parameters:
- dealPrice: The total deal price.
- siteAreaInSquareFeet: The site area in square feet.
CalculateDealPricePerUnit
No summary available.
Parameters:
- dealPrice: The total deal price.
- numberOfUnits: The number of units in the deal.