diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/AbstractEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/AbstractEntity.java index 9494260e..e3438e6e 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/AbstractEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/AbstractEntity.java @@ -5,8 +5,8 @@ import jakarta.persistence.Column; import jakarta.persistence.EntityListeners; import jakarta.persistence.Id; -import jakarta.persistence.Lob; import jakarta.persistence.MappedSuperclass; +import java.sql.Types; import java.util.Date; import lombok.AllArgsConstructor; import lombok.Getter; @@ -14,6 +14,7 @@ import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedBy; @@ -56,7 +57,7 @@ public abstract class AbstractEntity implements BaseEntity { @Column(name = "updated_by") protected String updatedBy; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] metadata; diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ArtifactEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ArtifactEntity.java index 086b5f10..e63a679a 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ArtifactEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ArtifactEntity.java @@ -7,14 +7,15 @@ import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; -import jakarta.persistence.Lob; import jakarta.persistence.Table; +import java.sql.Types; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.JdbcTypeCode; @NoArgsConstructor @AllArgsConstructor @@ -31,11 +32,11 @@ public class ArtifactEntity extends AbstractEntity implements SpecEntity, Status private Boolean embedded; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] spec; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] status; diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/DataItemEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/DataItemEntity.java index 72b0219c..3d0617e4 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/DataItemEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/DataItemEntity.java @@ -7,14 +7,15 @@ import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; -import jakarta.persistence.Lob; import jakarta.persistence.Table; +import java.sql.Types; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.JdbcTypeCode; @NoArgsConstructor @AllArgsConstructor @@ -31,11 +32,11 @@ public class DataItemEntity extends AbstractEntity implements SpecEntity, Status private Boolean embedded; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] spec; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] status; diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/FilesInfoEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/FilesInfoEntity.java index b02905e7..0ff8ff45 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/FilesInfoEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/FilesInfoEntity.java @@ -4,15 +4,16 @@ import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Index; -import jakarta.persistence.Lob; import jakarta.persistence.Table; import java.io.Serializable; +import java.sql.Types; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; +import org.hibernate.annotations.JdbcTypeCode; @NoArgsConstructor @AllArgsConstructor @@ -37,7 +38,7 @@ public class FilesInfoEntity implements Serializable { @Column(nullable = false) private String entityId; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude private byte[] files; } diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/FunctionEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/FunctionEntity.java index c2deb060..2be29e55 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/FunctionEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/FunctionEntity.java @@ -7,14 +7,15 @@ import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; -import jakarta.persistence.Lob; import jakarta.persistence.Table; +import java.sql.Types; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.JdbcTypeCode; @NoArgsConstructor @AllArgsConstructor @@ -31,11 +32,11 @@ public class FunctionEntity extends AbstractEntity implements SpecEntity, Status private Boolean embedded; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] spec; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] status; diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/LogEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/LogEntity.java index ca0b8ea1..34c6053e 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/LogEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/LogEntity.java @@ -4,15 +4,16 @@ import it.smartcommunitylabdhub.core.models.base.StatusEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; -import jakarta.persistence.Lob; import jakarta.persistence.Table; import jakarta.validation.constraints.NotNull; +import java.sql.Types; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.JdbcTypeCode; @AllArgsConstructor @NoArgsConstructor @@ -26,15 +27,15 @@ public class LogEntity extends AbstractEntity implements SpecEntity, StatusEntit @Column(nullable = false) private String run; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude private byte[] content; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] spec; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] status; diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ModelEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ModelEntity.java index d9115233..468f26dd 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ModelEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ModelEntity.java @@ -7,14 +7,15 @@ import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; -import jakarta.persistence.Lob; import jakarta.persistence.Table; +import java.sql.Types; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.JdbcTypeCode; @NoArgsConstructor @AllArgsConstructor @@ -31,11 +32,11 @@ public class ModelEntity extends AbstractEntity implements SpecEntity, StatusEnt private Boolean embedded; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] spec; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] status; diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ProjectEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ProjectEntity.java index bc01afb4..03b8d0f5 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ProjectEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/ProjectEntity.java @@ -11,10 +11,10 @@ import jakarta.persistence.Entity; import jakarta.persistence.EntityListeners; import jakarta.persistence.Id; -import jakarta.persistence.Lob; import jakarta.persistence.PrePersist; import jakarta.persistence.Table; import jakarta.validation.constraints.NotNull; +import java.sql.Types; import java.util.Date; import lombok.AllArgsConstructor; import lombok.Builder; @@ -22,6 +22,7 @@ import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedBy; @@ -52,15 +53,15 @@ public class ProjectEntity implements BaseEntity, SpecEntity, StatusEntity { private String source; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude private byte[] metadata; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude private byte[] spec; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude private byte[] status; diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/RunEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/RunEntity.java index 8d290c0a..93393669 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/RunEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/RunEntity.java @@ -7,15 +7,16 @@ import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; -import jakarta.persistence.Lob; import jakarta.persistence.Table; import jakarta.validation.constraints.NotNull; +import java.sql.Types; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.JdbcTypeCode; @AllArgsConstructor @NoArgsConstructor @@ -30,11 +31,11 @@ public class RunEntity extends AbstractEntity implements SpecEntity, StatusEntit @Column(nullable = false) private String task; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] spec; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] status; diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/SecretEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/SecretEntity.java index 07430547..e16cb3d7 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/SecretEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/SecretEntity.java @@ -7,15 +7,16 @@ import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; -import jakarta.persistence.Lob; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; +import java.sql.Types; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.JdbcTypeCode; @NoArgsConstructor @AllArgsConstructor @@ -32,11 +33,11 @@ public class SecretEntity extends AbstractEntity implements SpecEntity, StatusEn private Boolean embedded; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] spec; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] status; diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/TaskEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/TaskEntity.java index 845207b3..5cc602b9 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/TaskEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/TaskEntity.java @@ -3,16 +3,17 @@ import it.smartcommunitylabdhub.core.models.base.SpecEntity; import jakarta.persistence.Column; import jakarta.persistence.Entity; -import jakarta.persistence.Lob; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; import jakarta.validation.constraints.NotNull; +import java.sql.Types; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.JdbcTypeCode; @NoArgsConstructor @AllArgsConstructor @@ -36,7 +37,7 @@ public class TaskEntity extends AbstractEntity implements SpecEntity { @Column(nullable = true) private String workflow; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] spec; diff --git a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/WorkflowEntity.java b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/WorkflowEntity.java index 0f90e0de..2e2f3996 100644 --- a/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/WorkflowEntity.java +++ b/application/src/main/java/it/smartcommunitylabdhub/core/models/entities/WorkflowEntity.java @@ -5,14 +5,15 @@ import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; -import jakarta.persistence.Lob; import jakarta.persistence.Table; +import java.sql.Types; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; import lombok.experimental.SuperBuilder; +import org.hibernate.annotations.JdbcTypeCode; @NoArgsConstructor @AllArgsConstructor @@ -29,11 +30,11 @@ public class WorkflowEntity extends AbstractEntity { private Boolean embedded; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] spec; - @Lob + @JdbcTypeCode(Types.LONGVARBINARY) @ToString.Exclude protected byte[] status; diff --git a/modules/authorization/src/main/java/it/smartcommunitylabdhub/authorization/model/RefreshTokenEntity.java b/modules/authorization/src/main/java/it/smartcommunitylabdhub/authorization/model/RefreshTokenEntity.java index 33a84f53..b20cfc7f 100644 --- a/modules/authorization/src/main/java/it/smartcommunitylabdhub/authorization/model/RefreshTokenEntity.java +++ b/modules/authorization/src/main/java/it/smartcommunitylabdhub/authorization/model/RefreshTokenEntity.java @@ -3,8 +3,8 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Id; -import jakarta.persistence.Lob; import jakarta.persistence.Table; +import java.sql.Types; import java.util.Date; import lombok.AllArgsConstructor; import lombok.Builder; @@ -12,6 +12,7 @@ import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; +import org.hibernate.annotations.JdbcTypeCode; @Builder @Getter @@ -26,7 +27,7 @@ public class RefreshTokenEntity { @Id private String id; - @Lob + @JdbcTypeCode(Types.LONGVARCHAR) @Column(columnDefinition = "text") private String token;