package com.rjconsultores.ventaboletos.service.impl;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rjconsultores.ventaboletos.dao.FlywayUtilDAO;
import com.rjconsultores.ventaboletos.service.FlywayUtilService;

@Service("flywayUtilService")
public class FlywayUtilServiceImpl implements FlywayUtilService {

	private static Logger log = LogManager.getLogger(FlywayUtilServiceImpl.class);
	
	@Autowired
	private FlywayUtilDAO flywayUtilDAO;
	
	@Override
	public boolean existeErroExecucaoScript() {
		boolean existeErro = true;
		try{
			existeErro = flywayUtilDAO.existeErroExecucaoScript();
		}catch(Throwable t){
			log.error("",t);
		}
		
		return existeErro;
	}

}
