2018-06-27 12:29:21 +02:00
|
|
|
package eu.eudat.models.data.datasetprofile;
|
2017-12-21 10:26:11 +01:00
|
|
|
|
2023-07-25 14:04:39 +02: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
|
|
|
|
2023-07-25 14:04:39 +02:00
|
|
|
public class DatasetProfileAutocompleteItem implements DataModel<DescriptionTemplate, DatasetProfileAutocompleteItem> {
|
2017-12-21 10:26:11 +01:00
|
|
|
|
|
|
|
private UUID id;
|
|
|
|
private String label;
|
2019-07-30 17:30:47 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-07-30 17:30:47 +02:00
|
|
|
public String getDescription() {
|
|
|
|
return description;
|
|
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
|
|
this.description = description;
|
|
|
|
}
|
|
|
|
|
2017-12-21 10:26:11 +01:00
|
|
|
@Override
|
2023-07-25 14:04:39 +02:00
|
|
|
public DatasetProfileAutocompleteItem fromDataModel(DescriptionTemplate entity) {
|
2017-12-21 10:26:11 +01:00
|
|
|
this.id = entity.getId();
|
|
|
|
this.label = entity.getLabel();
|
2019-07-30 17:30:47 +02:00
|
|
|
this.description = entity.getDescription();
|
2018-02-16 08:45:18 +01:00
|
|
|
return this;
|
2017-12-21 10:26:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2023-07-25 14:04:39 +02:00
|
|
|
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
|
|
|
}
|