Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void setUp() {
EmailNotificationResponse mockResponse = new EmailNotificationResponse();
mockResponse.setTaskId("task-123");
mockResponse.setStatus(SCHEDULED_STATUS);
mockResponse.setNotificationId(UUID.randomUUID());
mockResponse.setNotificationId(1);

when(notificationService.scheduleEmailNotification(
any(EmailNotificationRequest.class),
Expand All @@ -107,21 +107,21 @@ void shouldSendAllDefendantResponseEmailsSuccessfully() throws Exception {
pcsCase.setCaseReference(1234567890L);

PaymentAgreementEntity paymentAgreement = new PaymentAgreementEntity();
paymentAgreement.setId(UUID.randomUUID());
paymentAgreement.setId(1);

DefendantResponseEntity defendantResponse = new DefendantResponseEntity();
defendantResponse.setParty(party);
defendantResponse.setPcsCase(pcsCase);
defendantResponse.setPaymentAgreement(paymentAgreement);

UUID defendantResponseId = UUID.randomUUID();
Integer defendantResponseId = 1;
when(defendantResponseRepository.findById(defendantResponseId))
.thenReturn(Optional.of(defendantResponse));

EmailNotificationResponse response = new EmailNotificationResponse();
response.setTaskId("task-123");
response.setStatus(SCHEDULED_STATUS);
response.setNotificationId(UUID.randomUUID());
response.setNotificationId(1);

when(notificationService.sendDefendantResponseNoCounterclaimEmailNotification(defendantResponse))
.thenReturn(response);
Expand All @@ -147,7 +147,7 @@ void shouldSendAllDefendantResponseEmailsSuccessfully() throws Exception {
@Test
@DisplayName("Should return 404 when defendant response not found")
void shouldReturn404WhenDefendantResponseNotFound() throws Exception {
UUID defendantResponseId = UUID.randomUUID();
Integer defendantResponseId = 1;

when(defendantResponseRepository.findById(defendantResponseId))
.thenReturn(Optional.empty());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.UUID;

@Entity
@Getter
Expand All @@ -23,8 +22,8 @@
public class AddressEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

private String addressLine1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.hibernate.type.SqlTypes;
import uk.gov.hmcts.reform.pcs.ccd.domain.VerticalYesNo;

import java.util.UUID;

@Builder
@Getter
Expand All @@ -30,8 +29,8 @@
public class AsbProhibitedConductEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne
@JsonBackReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

@Entity
@Table(name = "case_link")
Expand All @@ -31,8 +30,8 @@
public class CaseLinkEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "case_id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import java.time.Instant;
import java.time.LocalDateTime;
import java.util.UUID;

import static jakarta.persistence.FetchType.LAZY;
import static uk.gov.hmcts.reform.pcs.config.ClockConfiguration.UK_ZONE_ID;
Expand All @@ -33,8 +32,8 @@
public class CaseNoteEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@ManyToOne(fetch = LAZY)
@JoinColumn(name = "case_id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import uk.gov.hmcts.reform.pcs.ccd.entity.party.PartyEntity;

import java.time.LocalDateTime;
import java.util.UUID;

import static jakarta.persistence.FetchType.LAZY;

Expand All @@ -37,8 +36,8 @@
public class ClaimActivityLogEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@ManyToOne(fetch = LAZY)
@JoinColumn(name = "case_id", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
public class DraftCaseDataEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

private Long caseReference;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.UUID;

@Entity
@Builder
Expand All @@ -24,8 +23,8 @@
public class HelpWithFeesEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@Column(name = "hwf_reference", nullable = false)
private String hwfReference;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
public class PartyAccessCodeEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

private UUID partyId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.UUID;

@Entity
@Builder
Expand All @@ -35,8 +34,8 @@
public class TenancyLicenceEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne
@JoinColumn(name = "case_id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.UUID;

@Entity
@Builder
Expand All @@ -34,8 +33,8 @@
public class NoticeOfPossessionEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne
@JsonBackReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import uk.gov.hmcts.reform.pcs.ccd.domain.SuspensionOfRightToBuyHousingAct;
import uk.gov.hmcts.reform.pcs.ccd.entity.ClaimEntity;

import java.util.UUID;

@Entity
@Builder
Expand All @@ -34,8 +33,8 @@
public class PossessionAlternativesEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne
@JsonBackReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import uk.gov.hmcts.reform.pcs.ccd.entity.ClaimEntity;

import java.math.BigDecimal;
import java.util.UUID;

@Entity
@Builder
Expand All @@ -32,8 +31,8 @@
public class RentArrearsEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne
@JsonBackReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import uk.gov.hmcts.reform.pcs.ccd.entity.respondpossessionclaim.DefendantResponseEntity;

import java.time.LocalDateTime;
import java.util.UUID;

@Entity
@Builder
Expand All @@ -36,8 +35,8 @@
public class StatementOfTruthEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne
@JsonBackReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import uk.gov.hmcts.reform.pcs.ccd.domain.YesNoNotSure;
import uk.gov.hmcts.reform.pcs.ccd.domain.enforcetheorder.common.VulnerableCategory;

import java.util.UUID;

import static jakarta.persistence.FetchType.LAZY;

Expand All @@ -28,8 +27,8 @@
public class RiskProfileEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne(fetch = LAZY)
@JoinColumn(name = "enf_case_id", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import lombok.Setter;
import uk.gov.hmcts.reform.pcs.ccd.entity.party.PartyEntity;

import java.util.UUID;

@Entity
@Table(name = "enf_selected_defendants")
Expand All @@ -28,8 +27,8 @@
public class SelectedDefendantEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "enf_case_id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import java.math.BigDecimal;
import java.time.Instant;
import java.util.UUID;

@Entity
@Builder
Expand All @@ -37,8 +36,8 @@
public class WarrantEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne
@JoinColumn(name = "enf_case_id", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import uk.gov.hmcts.reform.pcs.ccd.domain.VerticalYesNo;

import java.time.Instant;
import java.util.UUID;

@Entity
@Builder
Expand All @@ -35,8 +34,8 @@
public class WarrantOfRestitutionEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne
@JoinColumn(name = "enf_case_id", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import java.math.BigDecimal;
import java.time.Instant;
import java.util.UUID;

@Entity
@Table(name = "enf_writ")
Expand All @@ -31,8 +30,8 @@
public class WritEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne
@JoinColumn(name = "enf_case_id", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import uk.gov.hmcts.reform.pcs.ccd.domain.LanguageUsed;

import java.time.Instant;
import java.util.UUID;

@Entity
@Table(name = "enf_writ_of_restitution")
Expand All @@ -33,8 +32,8 @@
public class WritOfRestitutionEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "enf_case_id", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
public class FeePaymentEntity {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@ManyToOne(fetch = LAZY)
@JoinColumn(name = "possession_claim_id", nullable = false)
Expand Down
Loading
Loading