package eu.eudat.logic.builders.entity;

import eu.eudat.logic.builders.Builder;
import eu.eudat.data.entities.Dataset;
import eu.eudat.data.entities.DatasetProfile;

import java.util.Date;
import java.util.Set;
import java.util.UUID;

/**
 * Created by ikalyvas on 2/15/2018.
 */
public class DatasetProfileBuilder extends Builder<DatasetProfile> {

    private UUID id;

    private String label;

    private Set<Dataset> dataset;

    private String definition;

    private Short status;

    private Date created;

    private Date modified = new Date();

    private String description;

    private String language;

    public DatasetProfileBuilder id(UUID id) {
        this.id = id;
        return this;
    }

    public DatasetProfileBuilder label(String label) {
        this.label = label;
        return this;
    }

    public DatasetProfileBuilder dataset(Set<Dataset> dataset) {
        this.dataset = dataset;
        return this;
    }

    public DatasetProfileBuilder definition(String definition) {
        this.definition = definition;
        return this;
    }

    public DatasetProfileBuilder status(Short status) {
        this.status = status;
        return this;
    }

    public DatasetProfileBuilder created(Date created) {
        this.created = created;
        return this;
    }

    public DatasetProfileBuilder modified(Date modified) {
        this.modified = modified;
        return this;
    }

    public DatasetProfileBuilder description(String description) {
        this.description = description;
        return this;
    }

    public DatasetProfileBuilder language(String language) {
        this.language = language;
        return this;
    }

    @Override
    public DatasetProfile build() {
        DatasetProfile datasetProfile = new DatasetProfile();
        datasetProfile.setCreated(created);
        datasetProfile.setStatus(status);
        datasetProfile.setId(id);
        datasetProfile.setDataset(dataset);
        datasetProfile.setDefinition(definition);
        datasetProfile.setDescription(description);
        datasetProfile.setModified(modified);
        datasetProfile.setLabel(label);
        datasetProfile.setLanguage(language);
        return datasetProfile;
    }
}
