package net.sevecek.dailyplanet;

import java.util.*;

public class Autor {

    private UUID id;
    private String krestniJmeno;
    private String prijmeni;
    private String email;
    private String telefon;

    @Deprecated
    public Autor() {
    }

    public Autor(UUID id) {
        if (id == null) {
            id = UUID.randomUUID();
        }
        this.id = id;
    }

    public Autor(String krestniJmeno, String prijmeni, String email, String telefon) {
        id = UUID.randomUUID();
        this.krestniJmeno = krestniJmeno;
        this.prijmeni = prijmeni;
        this.email = email;
        this.telefon = telefon;
    }

    public UUID getId() {
        return id;
    }

    @Deprecated
    public void setId(UUID newValue) {
        id = newValue;
    }

    public String getKrestniJmeno() {
        return krestniJmeno;
    }

    public void setKrestniJmeno(String newValue) {
        krestniJmeno = newValue;
    }

    public String getPrijmeni() {
        return prijmeni;
    }

    public void setPrijmeni(String newValue) {
        prijmeni = newValue;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String newValue) {
        email = newValue;
    }

    public String getTelefon() {
        return telefon;
    }

    public void setTelefon(String newValue) {
        telefon = newValue;
    }

    @Override
    public String toString() {
        return "Autor{" +
                "id=" + id +
                ", krestniJmeno='" + krestniJmeno + '\'' +
                ", prijmeni='" + prijmeni + '\'' +
                ", email='" + email + '\'' +
                ", telefon='" + telefon + '\'' +
                '}';
    }
}
