argos/dmp-backend/web/src/main/java/eu/eudat/models/data/datasetprofile/DatasetProfileAutocompleteI...

56 lines
1.3 KiB
Java
Raw Normal View History

2018-06-27 12:29:21 +02:00
package eu.eudat.models.data.datasetprofile;
2017-12-21 10:26:11 +01:00
import eu.eudat.data.entities.DescriptionTemplate;
2017-12-21 10:26:11 +01:00
import eu.eudat.models.DataModel;
import java.util.UUID;
2018-02-01 10:08:06 +01:00
public class DatasetProfileAutocompleteItem implements DataModel<DescriptionTemplate, DatasetProfileAutocompleteItem> {
2017-12-21 10:26:11 +01:00
private UUID id;
private String label;
private String description;
2017-12-21 10:26:11 +01:00
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
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;
}
2017-12-21 10:26:11 +01:00
@Override
public DatasetProfileAutocompleteItem fromDataModel(DescriptionTemplate entity) {
2017-12-21 10:26:11 +01:00
this.id = entity.getId();
this.label = entity.getLabel();
this.description = entity.getDescription();
2018-02-16 08:45:18 +01:00
return this;
2017-12-21 10:26:11 +01:00
}
@Override
public DescriptionTemplate toDataModel() {
DescriptionTemplate profile = new DescriptionTemplate();
2017-12-21 10:26:11 +01:00
profile.setId(this.id);
return profile;
}
2018-01-19 10:31:05 +01:00
@Override
public String getHint() {
return null;
}
2017-12-21 10:26:11 +01:00
}