Hdpi 5213 confirm eviction update data model#1583
Conversation
…ion` table to store confirmed eviction details.
…risk profile with physical description fields.
…213-Confirm-eviction-Update-data-model # Conflicts: # src/main/java/uk/gov/hmcts/reform/pcs/ccd/service/enforcetheorder/EnforcementOrderService.java
… replace case‑not‑found exception with clearer IllegalStateException. Update migration V067.
…213-Confirm-eviction-Update-data-model # Conflicts: # src/main/java/uk/gov/hmcts/reform/pcs/ccd/service/enforcetheorder/EnforcementOrderService.java # src/test/java/uk/gov/hmcts/reform/pcs/ccd/service/enforcetheorder/EnforcementOrderServiceTest.java
…213-Confirm-eviction-Update-data-model
…ename `hasUnavaliableDates` to `hasUnavailableDates`. Simplify `retrieveEnforcementOrderEntity` to return first order or null. Update migration V071 to include `enf_unavailable_date` and adjust schema. Remove obsolete tests and add new ones for the updated model.
…213-Confirm-eviction-Update-data-model
CCD diff summary👉 Full report: https://github.com/hmcts/pcs-api/actions/runs/23741458463?check_suite_focus=true AuthorisationCaseField/citizen.json
AuthorisationCaseField/caseworker-pcs.json
ComplexTypes/2_DefendantResponses.json
ComplexTypes/1_PaymentAgreement.json
|
…213-Confirm-eviction-Update-data-model
… change confirmEviction to only require caseReference, return an empty set instead of null, simplify enforcement order retrieval. Update related tests accordingly.
…213-Confirm-eviction-Update-data-model
|
|
||
| import java.util.UUID; | ||
|
|
||
| public interface ConfirmEvictionRepository extends JpaRepository<ConfirmEvictionEntity, UUID> { |
There was a problem hiding this comment.
Could these names just be "Eviction" ? I know the event name is different but just sounds wrong similar to enforceTheOrder in the name
| @@ -0,0 +1,95 @@ | |||
| package uk.gov.hmcts.reform.pcs.ccd.entity.enforcetheorder; | |||
There was a problem hiding this comment.
Shouldn't it be in confirmeviction package (for the event)
| Set<EnforcementOrderEntity> enforcementEntitySet = claimEntity.getEnforcementOrders(); | ||
| if (CollectionUtils.isEmpty(enforcementEntitySet)) { | ||
| Set<EnforcementOrderEntity> enforcementEntitySet = getEnforcementOrderEntities(caseReference); | ||
| if (enforcementEntitySet == null) { |
There was a problem hiding this comment.
Need test case for empty enforcement cases scenarios
There was a problem hiding this comment.
Aleady is one - shouldReturnNullIfNotFoundInDatabase()
|
|
||
| language_used VARCHAR(30), | ||
| created TIMESTAMP WITHOUT TIME ZONE NOT NULL, | ||
|
|
There was a problem hiding this comment.
Could add the DB column Statement of Truth leaving the entity, domain and mappings out (I did something similar in HDPI-5188). At least won't need to revisit with a alter table script later.
There was a problem hiding this comment.
It would still need to be altered. In order to put it in here I would need to make it nullable today. Then make it not nullable later.
https://tools.hmcts.net/jira/browse/HDPI-5213
Introduces the ability to confirm an eviction against an existing enforcement order, including persistence of eviction details and unavailable dates.
NOTE: Does not cover the Statement of Work at this time.
New ConfirmEvictionEntity and UnavailableDateEntity JPA entities with a one-to-many relationship for tracking dates the party is unavailable for eviction
New ConfirmEvictionRepository for persistence
Flyway migration creating enf_confirm_eviction and enf_unavailable_date tables, plus two new columns on enf_risk_profile
EnforcementOrderService additions: confirmEviction() method with mapping logic, and a new getClaimEntity() helper that throws IllegalStateException when no claim exists (for the save path)