package com.rjconsultores.ventaboletos.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.rjconsultores.ventaboletos.dao.FechamentoParamgeralDAO; import com.rjconsultores.ventaboletos.entidad.FechamentoParamgeral; import com.rjconsultores.ventaboletos.service.FechamentoParamgeralService; @Service("fechamentoParamgeralService") public class FechamentoParamgeralServiceImpl implements FechamentoParamgeralService { @Autowired private FechamentoParamgeralDAO fechamentoParamgeralDAO; @Override public List obtenerTodos() { return fechamentoParamgeralDAO.obtenerTodos(); } @Override public FechamentoParamgeral obtenerID(Long id) { return fechamentoParamgeralDAO.obtenerID(id); } @Override @Transactional public FechamentoParamgeral suscribir(FechamentoParamgeral entidad) { return fechamentoParamgeralDAO.suscribir(entidad); } @Override @Transactional public FechamentoParamgeral actualizacion(FechamentoParamgeral entidad) { return fechamentoParamgeralDAO.actualizacion(entidad); } @Override @Transactional public void borrar(FechamentoParamgeral entidad) { fechamentoParamgeralDAO.borrar(entidad); } public Long count(String campo, Object o) { return fechamentoParamgeralDAO.count(campo, o); } @Override public List buscaParametrosPorEmpresas(List empresasId) { return fechamentoParamgeralDAO.buscaParametrosPorEmpresas(empresasId); } @Override public List buscaParametrosPorEmpresa(Integer empresasId) { return fechamentoParamgeralDAO.buscaParametrosPorEmpresa(empresasId); } @Override @Transactional public FechamentoParamgeral suscribirOrActualizacion(FechamentoParamgeral fechamentoParamgeral) { if(fechamentoParamgeral != null && fechamentoParamgeral.getFechamentoparamgeralId() == null) { return suscribir(fechamentoParamgeral); } else if(fechamentoParamgeral != null && fechamentoParamgeral.getFechamentoparamgeralId() != null) { return actualizacion(fechamentoParamgeral); } return null; } }