package br.com.centralit.citcorpore.negocio;

import java.util.Collection;

import br.com.centralit.citcorpore.integracao.LiberacaoBaseConhecimentoDao;
import br.com.citframework.excecao.ServiceException;
import br.com.citframework.service.CrudServiceImpl;

@SuppressWarnings({"unchecked", "rawtypes"})
public class LiberacaoBaseConhecimentoServiceEjb extends CrudServiceImpl implements LiberacaoBaseConhecimentoService {

    private LiberacaoBaseConhecimentoDao dao;

    @Override
    protected LiberacaoBaseConhecimentoDao getDao() {
        if (dao == null) {
            dao = new LiberacaoBaseConhecimentoDao();
        }
        return dao;
    }

	@Override
    public Collection findByIdLiberacao(final Integer parm) throws Exception {
        try {
            return this.getDao().findByIdLiberacao(parm);
        } catch (final Exception e) {
            throw new ServiceException(e);
        }
    }

    @Override
    public void deleteByIdLiberacao(final Integer parm) throws Exception {
        try {
            this.getDao().deleteByIdLiberacao(parm);
        } catch (final Exception e) {
            throw new ServiceException(e);
        }
    }

}
