78 lines
2.0 KiB
Java
78 lines
2.0 KiB
Java
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;
|
|
|
|
public class MultiplicityPersist {
|
|
|
|
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;
|
|
}
|
|
|
|
public void setMax(Integer max) {
|
|
this.max = max;
|
|
}
|
|
|
|
public String getPlaceholder() {
|
|
return placeholder;
|
|
}
|
|
|
|
public void setPlaceholder(String placeholder) {
|
|
this.placeholder = placeholder;
|
|
}
|
|
|
|
public Boolean getTableView() {
|
|
return tableView;
|
|
}
|
|
|
|
public void setTableView(Boolean tableView) {
|
|
this.tableView = tableView;
|
|
}
|
|
|
|
@Component(MultiplicityValidator.ValidatorName)
|
|
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
|
public static class MultiplicityValidator extends BaseValidator<MultiplicityPersist> {
|
|
|
|
public static final String ValidatorName = "DescriptionTemplate.MultiplicityValidator";
|
|
|
|
protected MultiplicityValidator(ConventionService conventionService, ErrorThesaurusProperties errors) {
|
|
super(conventionService, errors);
|
|
}
|
|
|
|
@Override
|
|
protected Class<MultiplicityPersist> modelClass() {
|
|
return MultiplicityPersist.class;
|
|
}
|
|
|
|
@Override
|
|
protected List<Specification> specifications(MultiplicityPersist item) {
|
|
return Lists.newArrayList();
|
|
}
|
|
}
|
|
|
|
}
|