/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package it.inaf.oats.vospacebackend.implementation;

import ca.nrc.cadc.uws.server.DatabaseJobPersistence;
import ca.nrc.cadc.uws.server.JobDAO;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;

import javax.sql.DataSource;
/**
 *
 * @author bertocco
 */
public class DatabaseJobPersistenceImpl extends DatabaseJobPersistence {
 
    

    protected JobDAO.JobSchema getJobSchema() {
        
        return new JobDAO.JobSchema("Job", "JobDetail", false);
        
    }
    
    /**
     * Providing a data source.
     */
    protected DataSource getDataSource() {
    
        MysqlDataSource dataSource = new MysqlDataSource();
        dataSource.setDatabaseName("cadctest");
        dataSource.setUser("oatsops");
        dataSource.setPassword("Peper0ne");
        dataSource.setServerName("localhost");
        
        return dataSource;
    }
    
}
