argos/dmp-backend/core/src/main/java/eu/eudat/commons/types/descriptiontemplate/importmodel/MultiplicityImportXml.java

59 lines
1.5 KiB
Java

package eu.eudat.commons.types.descriptiontemplate.importmodel;
import eu.eudat.model.persist.descriptiontemplatedefinition.MultiplicityPersist;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "multiplicity")
public class MultiplicityImportXml {
private int max;
private int min;
private String placeholder;
private boolean tableView;
@XmlAttribute(name = "max")
public int getMax() {
return max;
}
public void setMax(int max) {
this.max = max;
}
@XmlAttribute(name = "min")
public int getMin() {
return min;
}
public void setMin(int min) {
this.min = min;
}
@XmlAttribute(name = "placeholder")
public String getPlaceholder() {
return placeholder;
}
public void setPlaceholder(String placeholder) {
this.placeholder = placeholder;
}
@XmlAttribute(name = "tableView")
public boolean getTableView() {
return tableView;
}
public void setTableView(boolean tableView) {
this.tableView = tableView;
}
public MultiplicityPersist toPersistModel() {
MultiplicityPersist multiplicityEntity = new MultiplicityPersist();
multiplicityEntity.setMax(max);
multiplicityEntity.setMin(min);
multiplicityEntity.setPlaceholder(placeholder);
multiplicityEntity.setTableView(tableView);
return multiplicityEntity;
}
}