package br.edu.ifba.inf008.mediaCenter.persistencia;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Collection;

import br.edu.ifba.inf008.mediaCenter.model.Servidor;
import teste.TesteBancoDados;

public class ServidorDAOSQL implements ServidorDAO {

	public static final String URI = "jdbc:postgresql://localhost:5432/postgres"; 
	public static final String USER = "postgres";	
	public static final String PWD = "aluno";	
	public static final String INSERT_SERVER = "INSERT INTO SERVIDOR_BASICO " + 
            									"(id, latenciaLeitura, latenciaEscrita, " +
            									"capacidadeOcupada, capacidadeTotal )  " +
            									"VALUES(?, ?, ?, ?, ?)";
	
	
	
	public ServidorDAOSQL() throws SQLException{
		DriverManager.registerDriver(new org.postgresql.Driver());
	}
	
	
	public Connection getConn() throws SQLException{
		return DriverManager.getConnection(ServidorDAOSQL.URI,
									       ServidorDAOSQL.USER, ServidorDAOSQL.PWD);
	}
	
	
	@Override
	public Collection<Servidor> findAll() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void save(Servidor servidor) throws Exception {
		String insert = ;

	}

}
