argos/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptiontemplatedefinition/MultiplicityPersist.java

78 lines
2.0 KiB
Java
Raw Normal View History

2023-10-30 14:07:59 +01:00
package eu.eudat.model.persist.descriptiontemplatedefinition;
import eu.eudat.commons.validation.BaseValidator;
import eu.eudat.commons.validation.specification.Specification;
import eu.eudat.convention.ConventionService;
import eu.eudat.errorcode.ErrorThesaurusProperties;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.util.List;
2023-10-30 14:07:59 +01:00
2023-11-01 17:12:59 +01:00
public class MultiplicityPersist {
2023-10-30 14:07:59 +01:00
private Integer min = null;
private Integer max = null;
private String placeholder = null;
private Boolean tableView = null;
public Integer getMin() {
return min;
}
public void setMin(Integer min) {
this.min = min;
}
public Integer getMax() {
return max;
}
2023-10-30 14:07:59 +01:00
public void setMax(Integer max) {
this.max = max;
}
2023-10-30 14:07:59 +01:00
public String getPlaceholder() {
return placeholder;
}
2023-10-30 14:07:59 +01:00
public void setPlaceholder(String placeholder) {
this.placeholder = placeholder;
}
2023-10-30 14:07:59 +01:00
public Boolean getTableView() {
return tableView;
}
2023-10-30 14:07:59 +01:00
public void setTableView(Boolean tableView) {
this.tableView = tableView;
}
2023-10-30 14:07:59 +01:00
@Component(MultiplicityValidator.ValidatorName)
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public static class MultiplicityValidator extends BaseValidator<MultiplicityPersist> {
2023-10-30 14:07:59 +01:00
public static final String ValidatorName = "DescriptionTemplate.MultiplicityValidator";
2023-10-30 14:07:59 +01:00
protected MultiplicityValidator(ConventionService conventionService, ErrorThesaurusProperties errors) {
super(conventionService, errors);
}
2023-10-30 14:07:59 +01:00
@Override
protected Class<MultiplicityPersist> modelClass() {
return MultiplicityPersist.class;
}
2023-10-30 14:07:59 +01:00
@Override
protected List<Specification> specifications(MultiplicityPersist item) {
return Lists.newArrayList();
}
}
2023-10-30 14:07:59 +01:00
}