102 lines
2.1 KiB
Java
102 lines
2.1 KiB
Java
package eu.eudat.models.datasetprofile;
|
|
|
|
import eu.eudat.entities.Dataset;
|
|
import eu.eudat.entities.DatasetProfile;
|
|
import eu.eudat.entities.DatasetProfileRuleset;
|
|
import eu.eudat.entities.DatasetProfileViewstyle;
|
|
import eu.eudat.models.DataModel;
|
|
import org.hibernate.annotations.GenericGenerator;
|
|
import org.hibernate.annotations.Type;
|
|
|
|
import javax.persistence.*;
|
|
import java.util.Date;
|
|
import java.util.Set;
|
|
import java.util.UUID;
|
|
|
|
|
|
public class DatasetProfileListingModel implements DataModel<DatasetProfile,DatasetProfileListingModel> {
|
|
|
|
private UUID id;
|
|
|
|
private String label;
|
|
|
|
private Short status;
|
|
|
|
private Date created;
|
|
|
|
private Date modified = new Date();
|
|
|
|
private String description;
|
|
|
|
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 Short getStatus() {
|
|
return status;
|
|
}
|
|
|
|
public void setStatus(Short status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public Date getCreated() {
|
|
return created;
|
|
}
|
|
|
|
public void setCreated(Date created) {
|
|
this.created = created;
|
|
}
|
|
|
|
public Date getModified() {
|
|
return modified;
|
|
}
|
|
|
|
public void setModified(Date modified) {
|
|
this.modified = modified;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
@Override
|
|
public DatasetProfileListingModel fromDataModel(DatasetProfile entity) {
|
|
this.id = entity.getId();
|
|
this.label = entity.getLabel();
|
|
this.status = entity.getStatus();
|
|
this.created = entity.getCreated();
|
|
this.modified = entity.getModified();
|
|
this.description = entity.getDescription();
|
|
return this;
|
|
}
|
|
|
|
@Override
|
|
public DatasetProfile toDataModel() {
|
|
DatasetProfile profile = new DatasetProfile();
|
|
profile.setId(this.id);
|
|
return profile;
|
|
}
|
|
|
|
@Override
|
|
public String getHint() {
|
|
return null;
|
|
}
|
|
}
|