|
| 1 | +package ca.bc.gov.nrs.ilcr.schedule10; |
| 2 | + |
| 3 | +import java.math.BigDecimal; |
| 4 | +import org.springframework.data.annotation.Id; |
| 5 | +import org.springframework.data.relational.core.mapping.Column; |
| 6 | +import org.springframework.data.relational.core.mapping.Table; |
| 7 | + |
| 8 | +/** |
| 9 | + * One Schedule 10 road-detail row — a {@code THE.ROAD_CONSTRUCTION_REPRT_DTL} row. |
| 10 | + * |
| 11 | + * <p>Shape is delivery-verified (Story 11.1 Task 1 gate (i)). Costs are NOT columns here: they are |
| 12 | + * keyed rows in {@code THE.ILCR_COST_REPORT_DETAIL} joined by |
| 13 | + * {@code ROAD_CONSTRUCTION_REPRT_DTL_ID} (BR-08), reassembled by {@link Schedule10Repository}. |
| 14 | + * |
| 15 | + * <p><strong>Three delivery columns are deliberately absent</strong> — business-directed departures |
| 16 | + * LD-1/LD-2/LD-3 remove ASM Code ({@code RELATIVE_SOIL_MOISTUR_RGM_CODE}), Soil Moisture Code |
| 17 | + * ({@code ILCR_SOIL_MOISTURE_CODE}) and Boulder Area % ({@code BOULDER_AREA_PCT}). They still exist |
| 18 | + * in the table and the first two are {@code NOT NULL} there, which is a hard problem for the Story |
| 19 | + * 11.2 write path but none at all for this read: we simply never select them. |
| 20 | + * |
| 21 | + * <p><strong>{@code REL_SOIL_MOIST_RGM_CLS_CODE} (RSMR Class) is nullable</strong> despite the |
| 22 | + * legacy view marking it required — it is populated in only 18 of 66 real delivery rows. |
| 23 | + * |
| 24 | + * <p>All numerics are boxed. Oracle {@code NUMBER} arrives as {@code BigDecimal} and null is a |
| 25 | + * first-class value throughout Schedule 10 (see {@link Schedule10Amounts}). |
| 26 | + */ |
| 27 | +@Table(name = "ROAD_CONSTRUCTION_REPRT_DTL", schema = "THE") |
| 28 | +public record RoadConstructionReportDetailEntity( |
| 29 | + @Id @Column("ROAD_CONSTRUCTION_REPRT_DTL_ID") Integer roadConstructionReprtDtlId, |
| 30 | + @Column("ROAD_CONSTRUCTION_REPRT_ID") Integer roadConstructionReprtId, |
| 31 | + @Column("ROAD_NAME") String roadName, |
| 32 | + @Column("SIDE_SLOPE_PCT") Integer sideSlopePct, |
| 33 | + @Column("ILCR_ROAD_LIFETIME_CODE") String ilcrRoadLifetimeCode, |
| 34 | + @Column("RIPPABLE_ROCK_PCT") Integer rippableRockPct, |
| 35 | + @Column("SOLID_ROCK_PCT") Integer solidRockPct, |
| 36 | + @Column("COARSE_MATERIAL_PCT") Integer coarseMaterialPct, |
| 37 | + @Column("BECBIOGEO_CATALOGUE_ID") Integer becbiogeoCatalogueId, |
| 38 | + @Column("FINE_MATERIAL_PCT") Integer fineMaterialPct, |
| 39 | + @Column("ORGANIC_MATERIAL_PCT") Integer organicMaterialPct, |
| 40 | + @Column("SUB_GRADE_LENGTH") BigDecimal subGradeLength, |
| 41 | + @Column("DETAIL_ENGINEERING_COST_IND") String detailEngineeringCostInd, |
| 42 | + @Column("END_HAUL_DISTANCE") BigDecimal endHaulDistance, |
| 43 | + @Column("END_HAUL_VOLUME") BigDecimal endHaulVolume, |
| 44 | + @Column("OVERLAND_DISTANCE") BigDecimal overlandDistance, |
| 45 | + @Column("OVERLAND_VOLUME") BigDecimal overlandVolume, |
| 46 | + @Column("ILCR_ROAD_BALLAST_METHOD_CODE") String ilcrRoadBallastMethodCode, |
| 47 | + @Column("SUB_GRADE_SURFACE_WIDTH") BigDecimal subGradeSurfaceWidth, |
| 48 | + @Column("ILCR_ROAD_BALLAST_MATERL_CODE") String ilcrRoadBallastMaterlCode, |
| 49 | + @Column("STABILIZING_LENGTH") BigDecimal stabilizingLength, |
| 50 | + @Column("STABILIZING_SURFACE_WIDTH") BigDecimal stabilizingSurfaceWidth, |
| 51 | + @Column("STABILIZING_DEPTH") BigDecimal stabilizingDepth, |
| 52 | + @Column("STABILIZING_DISTANCE_TO_SOURCE") BigDecimal stabilizingDistanceToSource, |
| 53 | + @Column("REL_SOIL_MOIST_RGM_CLS_CODE") String relSoilMoistRgmClsCode, |
| 54 | + @Column("COMMENTS") String comments, |
| 55 | + @Column("REVISION_COUNT") Integer revisionCount) { |
| 56 | +} |
0 commit comments