Added missing converter annotations on entity enums

This commit is contained in:
Thomas Georgios Giannos 2023-11-07 12:28:40 +02:00
parent ee68224f58
commit f878601609
3 changed files with 6 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import eu.eudat.commons.enums.DmpAccessType;
import eu.eudat.commons.enums.DmpStatus;
import eu.eudat.commons.enums.IsActive;
import eu.eudat.data.converters.DateToUTCConverter;
import eu.eudat.data.converters.enums.DmpStatusConverter;
import eu.eudat.data.converters.enums.IsActiveConverter;
import jakarta.persistence.*;
@ -30,8 +31,8 @@ public class DmpEntity {
public static final String _version = "version";
@Enumerated(EnumType.STRING)
@Column(name = "status", nullable = false)
@Convert(converter = DmpStatusConverter.class)
private DmpStatus status;
public static final String _status = "status";

View File

@ -2,6 +2,7 @@ package eu.eudat.data;
import eu.eudat.commons.enums.DmpUserRole;
import eu.eudat.commons.enums.IsActive;
import eu.eudat.data.converters.enums.DmpUserRoleConverter;
import eu.eudat.data.converters.enums.IsActiveConverter;
import jakarta.persistence.*;
@ -27,8 +28,8 @@ public class DmpUserEntity {
public static final String _user = "user";
@Enumerated(EnumType.STRING)
@Column(name = "status", nullable = false)
@Convert(converter = DmpUserRoleConverter.class)
private DmpUserRole role;
public static final String _role = "role";

View File

@ -3,6 +3,7 @@ package eu.eudat.data;
import eu.eudat.commons.enums.EntityType;
import eu.eudat.commons.enums.IsActive;
import eu.eudat.data.converters.DateToUTCConverter;
import eu.eudat.data.converters.enums.EntityTypeConverter;
import eu.eudat.data.converters.enums.IsActiveConverter;
import eu.eudat.data.old.DMP;
import jakarta.persistence.*;
@ -21,8 +22,8 @@ public class EntityDoiEntity {
public static final String _id = "id";
@Enumerated(EnumType.STRING)
@Column(name = "entity_type", nullable = false)
@Convert(converter = EntityTypeConverter.class)
private EntityType entityType;
public static final String _entityType = "entityType";