This commit is contained in:
CITE\spapacharalampous 2024-08-22 16:44:58 +03:00
parent bb47954068
commit 7314b358aa
4 changed files with 8 additions and 5 deletions

View File

@ -4,7 +4,7 @@ import jakarta.persistence.*;
import org.hibernate.annotations.Type; import org.hibernate.annotations.Type;
import org.opencdmp.commons.enums.DescriptionStatus; import org.opencdmp.commons.enums.DescriptionStatus;
import org.opencdmp.commons.enums.IsActive; 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.converters.enums.IsActiveConverter;
import org.opencdmp.data.tenant.TenantScopedBaseEntity; import org.opencdmp.data.tenant.TenantScopedBaseEntity;
import org.opencdmp.data.types.SQLXMLType; import org.opencdmp.data.types.SQLXMLType;
@ -43,7 +43,7 @@ public class DescriptionStatusEntity extends TenantScopedBaseEntity {
public static final String _isActive = "isActive"; public static final String _isActive = "isActive";
@Column(name = "internal_status", nullable = false) @Column(name = "internal_status", nullable = false)
@Convert(converter = DescriptionTemplateStatusConverter.class) @Convert(converter = DescriptionStatusConverter.class)
private DescriptionStatus internalStatus; private DescriptionStatus internalStatus;
public static final String _internalStatus = "internalStatus"; public static final String _internalStatus = "internalStatus";

View File

@ -6,6 +6,7 @@ import org.opencdmp.commons.enums.IsActive;
import org.opencdmp.commons.enums.PlanStatus; import org.opencdmp.commons.enums.PlanStatus;
import org.opencdmp.data.converters.enums.DescriptionTemplateStatusConverter; import org.opencdmp.data.converters.enums.DescriptionTemplateStatusConverter;
import org.opencdmp.data.converters.enums.IsActiveConverter; import org.opencdmp.data.converters.enums.IsActiveConverter;
import org.opencdmp.data.converters.enums.PlanStatusConverter;
import org.opencdmp.data.tenant.TenantScopedBaseEntity; import org.opencdmp.data.tenant.TenantScopedBaseEntity;
import org.opencdmp.data.types.SQLXMLType; import org.opencdmp.data.types.SQLXMLType;
@ -43,7 +44,7 @@ public class PlanStatusEntity extends TenantScopedBaseEntity {
public static final String _isActive = "isActive"; public static final String _isActive = "isActive";
@Column(name = "internal_status", nullable = false) @Column(name = "internal_status", nullable = false)
@Convert(converter = DescriptionTemplateStatusConverter.class) @Convert(converter = PlanStatusConverter.class)
private PlanStatus internalStatus; private PlanStatus internalStatus;
public static final String _internalStatus = "internalStatus"; public static final String _internalStatus = "internalStatus";

View File

@ -57,6 +57,10 @@ public class PlanStatusBuilder extends BaseBuilder<PlanStatus, PlanStatusEntity>
m.setId(d.getId()); m.setId(d.getId());
if (fields.hasField(this.asIndexer(PlanStatus._name))) if (fields.hasField(this.asIndexer(PlanStatus._name)))
m.setName(d.getName()); 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))) if (fields.hasField(this.asIndexer(PlanStatus._description)))
m.setDescription(d.getDescription()); m.setDescription(d.getDescription());
if (fields.hasField(this.asIndexer(PlanStatus._internalStatus))) if (fields.hasField(this.asIndexer(PlanStatus._internalStatus)))

View File

@ -191,8 +191,6 @@ public class PlanStatusQuery extends QueryBase<PlanStatusEntity> {
return PlanStatusEntity._internalStatus; return PlanStatusEntity._internalStatus;
else if (item.match(PlanStatus._definition)) else if (item.match(PlanStatus._definition))
return PlanStatusEntity._definition; return PlanStatusEntity._definition;
else if (item.prefix(PlanStatus._definition))
return PlanStatusEntity._definition;
else if (item.match(PlanStatus._createdAt)) else if (item.match(PlanStatus._createdAt))
return PlanStatusEntity._createdAt; return PlanStatusEntity._createdAt;
else if (item.match(PlanStatus._updatedAt)) else if (item.match(PlanStatus._updatedAt))