/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package paqueteBL;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 *
 * @author sysmq
 */
public class Pool {
    private String dataStore;
    private String pathBackup;
    private Date horaBackup;
    private String responsable;
    private List<Plantilla> plantillas;
    private List<Evento> eventos;
    private int id;

    public Pool()
    {
        id=1;
        plantillas=new ArrayList<Plantilla>();
        eventos=new ArrayList<Evento>();
    }
    /**
     * @return the dataStore
     */
    public String getDataStore() {
        return dataStore;
    }

    /**
     * @param dataStore the dataStore to set
     */
    public void setDataStore(String dataStore) {
        this.dataStore = dataStore;
    }

    /**
     * @return the pathBackup
     */
    public String getPathBackup() {
        return pathBackup;
    }

    /**
     * @param pathBackup the pathBackup to set
     */
    public void setPathBackup(String pathBackup) {
        this.pathBackup = pathBackup;
    }

    /**
     * @return the horaBackup
     */
    public Date getHoraBackup() {
        return horaBackup;
    }

    /**
     * @param horaBackup the horaBackup to set
     */
    public void setHoraBackup(Date horaBackup) {
        this.horaBackup = horaBackup;
    }

    /**
     * @return the responsable
     */
    public String getResponsable() {
        return responsable;
    }

    /**
     * @param responsable the responsable to set
     */
    public void setResponsable(String responsable) {
        this.responsable = responsable;
    }

    /**
     * @return the plantillas
     */
    public List<Plantilla> getPlantillas() {
        return plantillas;
    }

    /**
     * @param plantillas the plantillas to set
     */
    public void setPlantillas(List<Plantilla> plantillas) {
        this.plantillas = plantillas;
    }

    /**
     * @return the eventos
     */
    public List<Evento> getEventos() {
        return eventos;
    }

    /**
     * @param eventos the eventos to set
     */
    public void setEventos(List<Evento> eventos) {
        this.eventos = eventos;
    }

    public String getStrHora()
    {
        if (horaBackup!=null)
        {
            SimpleDateFormat formato = new SimpleDateFormat("HH:mm");
            return formato.format(horaBackup);
        }
        else
            return null;
    }

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    public void addPlantilla(Plantilla p)
    {
        plantillas.add(p);
    }
}
