package net.sevecek.dailyplanet;

import java.util.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.jdbc.core.*;
import org.springframework.stereotype.*;

@Repository
public class AutorRepository {

    @Autowired
    private JdbcTemplate pokladacDotazu;

    @Autowired
    private RowMapper<Autor> prevodnikTridyAutor;

    public List<Autor> findAll() {
        List<Autor> seznamAutoru = pokladacDotazu.query(
                "SELECT Autor_ID as id, KrestniJmeno, Prijmeni, Email, Telefon FROM autor",
                prevodnikTridyAutor);
        return seznamAutoru;
    }

    public Autor findById(UUID id) {
        throw new UnsupportedOperationException();
    }

    public Autor update(Autor zaznamKUlozeni) {
        throw new UnsupportedOperationException();
    }

    public void remove(UUID id) {
        throw new UnsupportedOperationException();
    }

    public Autor insert(Autor zaznamKPridani) {
        throw new UnsupportedOperationException();
    }

}
