Skip to content

Commit

Permalink
Merge pull request #15 from pagopa/PAGOPA-834-fix
Browse files Browse the repository at this point in the history
PAGOPA-834-fix: fix
  • Loading branch information
aomegax authored Apr 13, 2023
2 parents 13fdf19 + e2cd4f3 commit 01ca458
Show file tree
Hide file tree
Showing 27 changed files with 110 additions and 58 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>it.gov.pagopa.api-config</groupId>
<artifactId>starter</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>
<description>Starter module for projects related to Nodo dei Pagamenti configuration.
</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand All @@ -26,7 +25,6 @@
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@ToString
public class BinaryFile {

@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "hibernate_sequence")
@SequenceGenerator(
Expand All @@ -38,12 +36,10 @@ public class BinaryFile {

@Column(name = "FILE_CONTENT", nullable = false)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private byte[] fileContent;

@Column(name = "FILE_HASH", nullable = false)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private byte[] fileHash;

@Column(name = "FILE_SIZE", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package it.gov.pagopa.apiconfig.starter.entity;

import java.io.Serializable;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
Expand All @@ -9,6 +11,7 @@
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
Expand All @@ -33,7 +36,7 @@
@Builder
public class CanaleTipoVersamento implements Serializable {

private static final long serialVersionUID = -6296432351697050369L;
private static final long serialVersionUID = -8358589181553084940L;

@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "hibernate_sequence")
Expand All @@ -51,14 +54,20 @@ public class CanaleTipoVersamento implements Serializable {
private Long fkTipoVersamento;

@ToString.Exclude
@EqualsAndHashCode.Exclude
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_CANALE", nullable = false)
private Canali canale;

@ToString.Exclude
@EqualsAndHashCode.Exclude
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_TIPO_VERSAMENTO", nullable = false)
private TipiVersamento tipoVersamento;

@OneToMany(
fetch = FetchType.LAZY,
mappedBy = "fkCanaleTipoVersamento",
cascade = CascadeType.REMOVE)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private List<PspCanaleTipoVersamento> pspCanaleTipoVersamentoList;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand Down Expand Up @@ -49,14 +50,14 @@ public class Canali implements Serializable {

@Convert(converter = YesNoConverter.class)
@Column(name = "ENABLED", nullable = false)
@Builder.Default
private Boolean enabled = false;

@Column(name = "IP", length = 100)
private String ip;

@ToString.Exclude
@Column(name = "NEW_PASSWORD", length = 15)
@EqualsAndHashCode.Exclude
private String newPassword;

@ToString.Exclude
Expand All @@ -79,18 +80,19 @@ public class Canali implements Serializable {
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_INTERMEDIARIO_PSP", nullable = false)
@NotNull
@EqualsAndHashCode.Exclude
private IntermediariPsp fkIntermediarioPsp;

@Convert(converter = YesNoConverter.class)
@Column(name = "PROXY_ENABLED", nullable = false)
@Builder.Default
private Boolean proxyEnabled = false;

@Column(name = "PROXY_HOST", length = 100)
private String proxyHost;

@ToString.Exclude
@Column(name = "PROXY_PASSWORD", length = 15)
@EqualsAndHashCode.Exclude
private String proxyPassword;

@Column(name = "PROXY_PORT")
Expand All @@ -110,12 +112,10 @@ public class Canali implements Serializable {

@Convert(converter = YesNoConverter.class)
@Column(name = "CANALE_NODO", nullable = false)
@Builder.Default
private Boolean canaleNodo = false;

@Convert(converter = YesNoConverter.class)
@Column(name = "CANALE_AVV", nullable = false)
@Builder.Default
private Boolean canaleAvv = false;

@ToString.Exclude
Expand All @@ -131,7 +131,6 @@ public class Canali implements Serializable {

@Convert(converter = YesNoConverter.class)
@Column(name = "USE_NEW_FAULT_CODE", nullable = false)
@Builder.Default
private Boolean useNewFaultCode = false;

@Column(name = "TIMEOUT_A", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,13 @@ public class CanaliNodo implements Serializable {

@Convert(converter = YesNoConverter.class)
@Column(name = "MULTI_PAYMENT", nullable = false)
@Builder.Default
private Boolean multiPayment = false;

@Column(name = "RAGIONE_SOCIALE", length = 35)
private String ragioneSociale;

@Convert(converter = YesNoConverter.class)
@Column(name = "RPT_RT_COMPLIANT", nullable = false)
@Builder.Default
private Boolean rptRtCompliant = false;

@Column(name = "WSAPI", length = 15)
Expand All @@ -89,37 +87,30 @@ public class CanaliNodo implements Serializable {

@Convert(converter = YesNoConverter.class)
@Column(name = "LENTO", nullable = false)
@Builder.Default
private Boolean lento = false;

@Convert(converter = YesNoConverter.class)
@Column(name = "RT_PUSH", nullable = false)
@Builder.Default
private Boolean rtPush = false;

@Convert(converter = YesNoConverter.class)
@Column(name = "AGID_CHANNEL", nullable = false)
@Builder.Default
private Boolean agidChannel = false;

@Convert(converter = YesNoConverter.class)
@Column(name = "ON_US", nullable = false)
@Builder.Default
private Boolean onUs = false;

@Convert(converter = YesNoConverter.class)
@Column(name = "CARRELLO_CARTE", nullable = false)
@Builder.Default
private Boolean carrelloCarte = false;

@Convert(converter = YesNoConverter.class)
@Column(name = "RECOVERY", nullable = false)
@Builder.Default
private Boolean recovery = false;

@Convert(converter = YesNoConverter.class)
@Column(name = "MARCA_BOLLO_DIGITALE", nullable = false)
@Builder.Default
private Boolean marcaBolloDigitale = false;

@Convert(converter = YesNoConverter.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand Down Expand Up @@ -51,11 +52,17 @@ public class CdiDetail {
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_CDI_MASTER", nullable = false)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private CdiMaster fkCdiMaster;

@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_PSP_CANALE_TIPO_VERSAMENTO", nullable = false)
@JoinColumn(
name = "FK_PSP_CANALE_TIPO_VERSAMENTO",
nullable = false,
insertable = false,
updatable = false)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private PspCanaleTipoVersamento fkPspCanaleTipoVersamento;

@Column(name = "CANALE_APP")
Expand All @@ -70,13 +77,22 @@ public class CdiDetail {

@OneToMany(fetch = FetchType.LAZY, mappedBy = "fkCdiDetail", cascade = CascadeType.REMOVE)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private List<CdiInformazioniServizio> cdiInformazioniServizio;

@OneToMany(fetch = FetchType.LAZY, mappedBy = "fkCdiDetail", cascade = CascadeType.REMOVE)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private List<CdiFasciaCostoServizio> cdiFasciaCostoServizio;

@OneToMany(fetch = FetchType.LAZY, mappedBy = "cdiDetail", cascade = CascadeType.REMOVE)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private List<CdiPreference> cdiPreference;

@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_PSP_CANALE_TIPO_VERSAMENTO", nullable = false)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private PspCanaleTipoVersamentoCanale pspCanaleTipoVersamento;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand All @@ -28,7 +27,6 @@
@NoArgsConstructor
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class CdiPreference {

@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "hibernate_sequence")
@SequenceGenerator(
Expand All @@ -41,7 +39,6 @@ public class CdiPreference {
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_INFORMATIVA_DETAIL", nullable = false)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private CdiDetail cdiDetail;

@Column(name = "SELLER", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class CdsSoggettoServizio {
@JoinColumn(name = "STAZIONE", nullable = true)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private Stazioni stazione;
private PaStazionePa stazionePa;

@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_CDS_SOGGETTO", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand Down Expand Up @@ -42,10 +43,12 @@ public class CodifichePa {
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_CODIFICA", nullable = false)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private Codifiche fkCodifica;

@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_PA", nullable = false)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private Pa fkPa;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class ConfigurationKeys implements Serializable {
@Column(name = "CONFIG_CATEGORY", nullable = false, length = 255)
private String configCategory;

@Id
@Column(name = "CONFIG_KEY", nullable = false, length = 255)
private String configKey;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,10 @@
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Id;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
public class ConfigurationKeysView implements Serializable {

private static final long serialVersionUID = -6474996311359538937L;
private static final long serialVersionUID = -6198929539099423043L;

@Id
@Column(name = "CONFIG_CATEGORY", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand All @@ -29,7 +33,7 @@ public class IbanValidiPerPa {
@Column(name = "OBJ_ID")
private Long objId;

@Column(name = "FK_PA")
@Column(name = "FK_PA", nullable = false, insertable = false, updatable = false)
private Long fkPa;

@Column(name = "IBAN_ACCREDITO")
Expand Down Expand Up @@ -58,4 +62,10 @@ public class IbanValidiPerPa {

@Column(name = "MASTER_OBJ")
private Long masterObj;

@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "FK_PA", nullable = false)
@ToString.Exclude
@EqualsAndHashCode.Exclude
private Pa pa;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package it.gov.pagopa.apiconfig.starter.entity;

import it.gov.pagopa.apiconfig.starter.util.NumericBooleanConverter;
import it.gov.pagopa.apiconfig.starter.util.YesNoConverter;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
Expand Down Expand Up @@ -42,8 +42,7 @@ public class InformativePaDetail {
private Long id;

@Column(name = "FLAG_DISPONIBILITA", nullable = false)
@Convert(converter = NumericBooleanConverter.class)
@Builder.Default
@Convert(converter = YesNoConverter.class)
private Boolean flagDisponibilita = false;

@Column(name = "GIORNO", length = 35)
Expand Down
Loading

0 comments on commit 01ca458

Please sign in to comment.