103 lines
2.2 KiB
Java
103 lines
2.2 KiB
Java
package eu.eudat.model.persist.dmpblueprintdefinition;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|
import eu.eudat.commons.enums.DmpBlueprintFieldCategory;
|
|
import eu.eudat.commons.validation.ValidEnum;
|
|
import eu.eudat.commons.validation.ValidId;
|
|
import jakarta.validation.constraints.NotEmpty;
|
|
import jakarta.validation.constraints.NotNull;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
@JsonTypeInfo(
|
|
use = JsonTypeInfo.Id.NAME,
|
|
include = JsonTypeInfo.As.PROPERTY,
|
|
property = "category")
|
|
@JsonSubTypes({
|
|
@JsonSubTypes.Type(value = SystemFieldPersist.class, name = "0"),
|
|
@JsonSubTypes.Type(value = ExtraFieldPersist.class, name = "1")
|
|
})
|
|
public abstract class FieldPersist {
|
|
@NotNull(message = "{validation.empty}")
|
|
@ValidId(message = "{validation.invalidid}")
|
|
private UUID id = null;
|
|
|
|
@ValidEnum(message = "{validation.empty}")
|
|
private DmpBlueprintFieldCategory category;
|
|
|
|
@NotNull(message = "{validation.empty}")
|
|
@NotEmpty(message = "{validation.empty}")
|
|
private String label = null;
|
|
|
|
|
|
@NotNull(message = "{validation.empty}")
|
|
@NotEmpty(message = "{validation.empty}")
|
|
private String placeholder = null;
|
|
|
|
private String description;
|
|
|
|
@NotNull(message = "{validation.empty}")
|
|
private Integer ordinal = null;
|
|
|
|
@NotNull(message = "{validation.empty}")
|
|
private Boolean required = null;
|
|
|
|
public UUID getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(UUID id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public DmpBlueprintFieldCategory getCategory() {
|
|
return category;
|
|
}
|
|
|
|
public void setCategory(DmpBlueprintFieldCategory category) {
|
|
this.category = category;
|
|
}
|
|
|
|
public String getLabel() {
|
|
return label;
|
|
}
|
|
|
|
public void setLabel(String label) {
|
|
this.label = label;
|
|
}
|
|
|
|
public String getPlaceholder() {
|
|
return placeholder;
|
|
}
|
|
|
|
public void setPlaceholder(String placeholder) {
|
|
this.placeholder = placeholder;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public Integer getOrdinal() {
|
|
return ordinal;
|
|
}
|
|
|
|
public void setOrdinal(Integer ordinal) {
|
|
this.ordinal = ordinal;
|
|
}
|
|
|
|
public Boolean getRequired() {
|
|
return required;
|
|
}
|
|
|
|
public void setRequired(Boolean required) {
|
|
this.required = required;
|
|
}
|
|
}
|