package librecon;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit. 

import android.os.Parcel;
import android.os.Parcelable;

import java.util.Locale;

/**
 * Entity mapped to table SCHEDULE.
 */
public class Schedule implements Parcelable {

    private Long id;
    private String nameEs;
    private String nameEu;
    private String nameEn;
    private String date;
    private String descriptionEs;
    private String descriptionEu;
    private String descriptionEn;
    private String picUrl;
    private String picUrlSquare;
    private String startDatetime;
    private String finishDatetime;
    private String links;
    private String tags;
    private String location;
    private String targetDate;
    private String color;
    private String speakers;

    public Schedule() {
    }

    public Schedule(Long id) {
        this.id = id;
    }

    public Schedule(Long id, String nameEs, String nameEu, String nameEn, String date, String descriptionEs, String descriptionEu, String descriptionEn, String picUrl, String picUrlSquare, String startDatetime, String finishDatetime, String links, String tags, String location, String targetDate, String color) {
        this.id = id;
        this.nameEs = nameEs;
        this.nameEu = nameEu;
        this.nameEn = nameEn;
        this.date = date;
        this.descriptionEs = descriptionEs;
        this.descriptionEu = descriptionEu;
        this.descriptionEn = descriptionEn;
        this.picUrl = picUrl;
        this.picUrlSquare = picUrlSquare;
        this.startDatetime = startDatetime;
        this.finishDatetime = finishDatetime;
        this.links = links;
        this.tags = tags;
        this.location = location;
        this.targetDate = targetDate;
        this.color = color;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNameEs() {
        return nameEs;
    }

    public void setNameEs(String nameEs) {
        this.nameEs = nameEs;
    }

    public String getNameEu() {
        return nameEu;
    }

    public void setNameEu(String nameEu) {
        this.nameEu = nameEu;
    }

    public String getNameEn() {
        return nameEn;
    }

    public void setNameEn(String nameEn) {
        this.nameEn = nameEn;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getDescriptionEs() {
        return descriptionEs;
    }

    public void setDescriptionEs(String descriptionEs) {
        this.descriptionEs = descriptionEs;
    }

    public String getDescriptionEu() {
        return descriptionEu;
    }

    public void setDescriptionEu(String descriptionEu) {
        this.descriptionEu = descriptionEu;
    }

    public String getDescriptionEn() {
        return descriptionEn;
    }

    public void setDescriptionEn(String descriptionEn) {
        this.descriptionEn = descriptionEn;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public String getPicUrlSquare() {
        return picUrlSquare;
    }

    public void setPicUrlSquare(String picUrlSquare) {
        this.picUrlSquare = picUrlSquare;
    }

    public String getStartDatetime() {
        return startDatetime;
    }

    public void setStartDatetime(String startDatetime) {
        this.startDatetime = startDatetime;
    }

    public String getFinishDatetime() {
        return finishDatetime;
    }

    public void setFinishDatetime(String finishDatetime) {
        this.finishDatetime = finishDatetime;
    }

    public String getLinks() {
        return links;
    }

    public void setLinks(String links) {
        this.links = links;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getTargetDate() {
        return targetDate;
    }

    public void setTargetDate(String targetDate) {
        this.targetDate = targetDate;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getName() {
        Locale locale = Locale.getDefault();
        String language = locale.getLanguage();
        if (language.equals("eu"))
            return this.nameEu;
        else if (language.equals("en"))
            return this.nameEn;
        else
            return this.nameEs;
    }

    public String getDescription() {
        Locale locale = Locale.getDefault();
        String language = locale.getLanguage();
        if (language.equals("eu"))
            return this.descriptionEu;
        else if (language.equals("en"))
            return this.descriptionEn;
        else
            return this.descriptionEs;
    }

    public String getSpeakers() {
        return this.speakers;
    }

    public void setSpeakers(String speakers) {
        this.speakers = speakers;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeString(this.nameEs);
        dest.writeString(this.nameEu);
        dest.writeString(this.nameEn);
        dest.writeString(this.date);
        dest.writeString(this.descriptionEs);
        dest.writeString(this.descriptionEu);
        dest.writeString(this.descriptionEn);
        dest.writeString(this.picUrl);
        dest.writeString(this.picUrlSquare);
        dest.writeString(this.startDatetime);
        dest.writeString(this.finishDatetime);
        dest.writeString(this.links);
        dest.writeString(this.tags);
        dest.writeString(this.location);
        dest.writeString(this.targetDate);
        dest.writeString(this.color);
    }

    private Schedule(Parcel in) {
        this.id = (Long) in.readValue(Long.class.getClassLoader());
        this.nameEs = in.readString();
        this.nameEu = in.readString();
        this.nameEn = in.readString();
        this.date = in.readString();
        this.descriptionEs = in.readString();
        this.descriptionEu = in.readString();
        this.descriptionEn = in.readString();
        this.picUrl = in.readString();
        this.picUrlSquare = in.readString();
        this.startDatetime = in.readString();
        this.finishDatetime = in.readString();
        this.links = in.readString();
        this.tags = in.readString();
        this.location = in.readString();
        this.targetDate = in.readString();
        this.color = in.readString();
    }

    public static final Creator<Schedule> CREATOR = new Creator<Schedule>() {
        public Schedule createFromParcel(Parcel source) {
            return new Schedule(source);
        }

        public Schedule[] newArray(int size) {
            return new Schedule[size];
        }
    };
}
