92 lines
2.2 KiB
Java
92 lines
2.2 KiB
Java
package eu.eudat.model.persist.referencetypedefinition;
|
|
|
|
import eu.eudat.commons.enums.ReferenceFieldDataType;
|
|
import eu.eudat.commons.validation.BaseValidator;
|
|
import eu.eudat.commons.validation.old.ValidEnum;
|
|
import eu.eudat.commons.validation.specification.Specification;
|
|
import eu.eudat.convention.ConventionService;
|
|
import eu.eudat.errorcode.ErrorThesaurusProperties;
|
|
import jakarta.validation.constraints.NotEmpty;
|
|
import jakarta.validation.constraints.NotNull;
|
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
|
import org.springframework.context.annotation.Scope;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
public class ReferenceTypeFieldPersist {
|
|
|
|
private String code = null;
|
|
|
|
public static final String _code = "code";
|
|
|
|
private String label = null;
|
|
|
|
public static final String _label = "label";
|
|
|
|
private String description;
|
|
|
|
private ReferenceFieldDataType dataType;
|
|
|
|
public static final String _dataType = "dataType";
|
|
|
|
public String getCode() {
|
|
return code;
|
|
}
|
|
|
|
public void setCode(String code) {
|
|
this.code = code;
|
|
}
|
|
|
|
public String getLabel() {
|
|
return label;
|
|
}
|
|
|
|
public void setLabel(String label) {
|
|
this.label = label;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public ReferenceFieldDataType getDataType() {
|
|
return dataType;
|
|
}
|
|
|
|
public void setDataType(ReferenceFieldDataType dataType) {
|
|
this.dataType = dataType;
|
|
}
|
|
|
|
@Component(ReferenceTypeFieldPersistValidator.ValidatorName)
|
|
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
|
public static class ReferenceTypeFieldPersistValidator extends BaseValidator<ReferenceTypeFieldPersist> {
|
|
|
|
public static final String ValidatorName = "ReferenceTypeFieldPersistValidator";
|
|
|
|
protected ReferenceTypeFieldPersistValidator(ConventionService conventionService, ErrorThesaurusProperties errors) {
|
|
super(conventionService, errors);
|
|
}
|
|
|
|
@Override
|
|
protected Class<ReferenceTypeFieldPersist> modelClass() {
|
|
return ReferenceTypeFieldPersist.class;
|
|
}
|
|
|
|
@Override
|
|
protected List<Specification> specifications(ReferenceTypeFieldPersist item) {
|
|
return Arrays.asList(
|
|
|
|
);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|