From 7314b358aa94ad686a312d5e8e6645d46d3e831b Mon Sep 17 00:00:00 2001 From: "CITE\\spapacharalampous" Date: Thu, 22 Aug 2024 16:44:58 +0300 Subject: [PATCH] fixes --- .../main/java/org/opencdmp/data/DescriptionStatusEntity.java | 4 ++-- .../src/main/java/org/opencdmp/data/PlanStatusEntity.java | 3 ++- .../opencdmp/model/builder/planstatus/PlanStatusBuilder.java | 4 ++++ .../src/main/java/org/opencdmp/query/PlanStatusQuery.java | 2 -- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/backend/core/src/main/java/org/opencdmp/data/DescriptionStatusEntity.java b/backend/core/src/main/java/org/opencdmp/data/DescriptionStatusEntity.java index 4902842b6..a8c64a94c 100644 --- a/backend/core/src/main/java/org/opencdmp/data/DescriptionStatusEntity.java +++ b/backend/core/src/main/java/org/opencdmp/data/DescriptionStatusEntity.java @@ -4,7 +4,7 @@ import jakarta.persistence.*; import org.hibernate.annotations.Type; import org.opencdmp.commons.enums.DescriptionStatus; import org.opencdmp.commons.enums.IsActive; -import org.opencdmp.data.converters.enums.DescriptionTemplateStatusConverter; +import org.opencdmp.data.converters.enums.DescriptionStatusConverter; import org.opencdmp.data.converters.enums.IsActiveConverter; import org.opencdmp.data.tenant.TenantScopedBaseEntity; import org.opencdmp.data.types.SQLXMLType; @@ -43,7 +43,7 @@ public class DescriptionStatusEntity extends TenantScopedBaseEntity { public static final String _isActive = "isActive"; @Column(name = "internal_status", nullable = false) - @Convert(converter = DescriptionTemplateStatusConverter.class) + @Convert(converter = DescriptionStatusConverter.class) private DescriptionStatus internalStatus; public static final String _internalStatus = "internalStatus"; diff --git a/backend/core/src/main/java/org/opencdmp/data/PlanStatusEntity.java b/backend/core/src/main/java/org/opencdmp/data/PlanStatusEntity.java index dc93a3f26..be49b0fd8 100644 --- a/backend/core/src/main/java/org/opencdmp/data/PlanStatusEntity.java +++ b/backend/core/src/main/java/org/opencdmp/data/PlanStatusEntity.java @@ -6,6 +6,7 @@ import org.opencdmp.commons.enums.IsActive; import org.opencdmp.commons.enums.PlanStatus; import org.opencdmp.data.converters.enums.DescriptionTemplateStatusConverter; import org.opencdmp.data.converters.enums.IsActiveConverter; +import org.opencdmp.data.converters.enums.PlanStatusConverter; import org.opencdmp.data.tenant.TenantScopedBaseEntity; import org.opencdmp.data.types.SQLXMLType; @@ -43,7 +44,7 @@ public class PlanStatusEntity extends TenantScopedBaseEntity { public static final String _isActive = "isActive"; @Column(name = "internal_status", nullable = false) - @Convert(converter = DescriptionTemplateStatusConverter.class) + @Convert(converter = PlanStatusConverter.class) private PlanStatus internalStatus; public static final String _internalStatus = "internalStatus"; diff --git a/backend/core/src/main/java/org/opencdmp/model/builder/planstatus/PlanStatusBuilder.java b/backend/core/src/main/java/org/opencdmp/model/builder/planstatus/PlanStatusBuilder.java index c8ad49d6e..353aca05d 100644 --- a/backend/core/src/main/java/org/opencdmp/model/builder/planstatus/PlanStatusBuilder.java +++ b/backend/core/src/main/java/org/opencdmp/model/builder/planstatus/PlanStatusBuilder.java @@ -57,6 +57,10 @@ public class PlanStatusBuilder extends BaseBuilder m.setId(d.getId()); if (fields.hasField(this.asIndexer(PlanStatus._name))) m.setName(d.getName()); + if (fields.hasField(this.asIndexer(PlanStatus._createdAt))) + m.setCreatedAt(d.getCreatedAt()); + if (fields.hasField(this.asIndexer(PlanStatus._updatedAt))) + m.setUpdatedAt(d.getUpdatedAt()); if (fields.hasField(this.asIndexer(PlanStatus._description))) m.setDescription(d.getDescription()); if (fields.hasField(this.asIndexer(PlanStatus._internalStatus))) diff --git a/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java b/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java index 63565b2a0..274650f95 100644 --- a/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java +++ b/backend/core/src/main/java/org/opencdmp/query/PlanStatusQuery.java @@ -191,8 +191,6 @@ public class PlanStatusQuery extends QueryBase { return PlanStatusEntity._internalStatus; else if (item.match(PlanStatus._definition)) return PlanStatusEntity._definition; - else if (item.prefix(PlanStatus._definition)) - return PlanStatusEntity._definition; else if (item.match(PlanStatus._createdAt)) return PlanStatusEntity._createdAt; else if (item.match(PlanStatus._updatedAt))