81 lines
2.2 KiB
Java
81 lines
2.2 KiB
Java
package eu.eudat.model.persist.referencetypedefinition;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|
import eu.eudat.commons.enums.ReferenceTypeSourceType;
|
|
import eu.eudat.commons.validation.old.ValidEnum;
|
|
import jakarta.validation.Valid;
|
|
import jakarta.validation.constraints.NotEmpty;
|
|
import jakarta.validation.constraints.NotNull;
|
|
|
|
import java.util.List;
|
|
|
|
@JsonTypeInfo(
|
|
use = JsonTypeInfo.Id.NAME,
|
|
include = JsonTypeInfo.As.PROPERTY,
|
|
property = "type",
|
|
visible = true)
|
|
@JsonSubTypes({
|
|
@JsonSubTypes.Type(value = ReferenceTypeSourceExternalApiConfigurationPersist.class, name = "0"),
|
|
@JsonSubTypes.Type(value = ReferenceTypeSourceStaticOptionConfigurationPersist.class, name = "1")
|
|
})
|
|
public abstract class ReferenceTypeSourceBaseConfigurationPersist {
|
|
|
|
@NotNull(message = "{validation.empty}")
|
|
@NotEmpty(message = "{validation.empty}")
|
|
private String key = null;
|
|
|
|
@NotNull(message = "{validation.empty}")
|
|
@NotEmpty(message = "{validation.empty}")
|
|
private String label = null;
|
|
|
|
@NotNull(message = "{validation.empty}")
|
|
private Integer ordinal = null;
|
|
|
|
@ValidEnum(message = "{validation.empty}")
|
|
private ReferenceTypeSourceType type;
|
|
|
|
@Valid
|
|
private List<ReferenceTypeSourceBaseDependencyPersist> dependencies;
|
|
|
|
public String getKey() {
|
|
return key;
|
|
}
|
|
|
|
public void setKey(String key) {
|
|
this.key = key;
|
|
}
|
|
|
|
public String getLabel() {
|
|
return label;
|
|
}
|
|
|
|
public void setLabel(String label) {
|
|
this.label = label;
|
|
}
|
|
|
|
public Integer getOrdinal() {
|
|
return ordinal;
|
|
}
|
|
|
|
public void setOrdinal(Integer ordinal) {
|
|
this.ordinal = ordinal;
|
|
}
|
|
|
|
public ReferenceTypeSourceType getType() {
|
|
return type;
|
|
}
|
|
|
|
public void setType(ReferenceTypeSourceType type) {
|
|
this.type = type;
|
|
}
|
|
|
|
public List<ReferenceTypeSourceBaseDependencyPersist> getDependencies() {
|
|
return dependencies;
|
|
}
|
|
|
|
public void setDependencies(List<ReferenceTypeSourceBaseDependencyPersist> dependencies) {
|
|
this.dependencies = dependencies;
|
|
}
|
|
}
|