Commit 532dc6a9edaddfcd78ce4ee86e2764a0b956dbfb

Authored by joyfas.silva
1 parent 0a0327f1
Exists in master

Redimine #tarefa-3815

cit-adm-materiais-api/src/main/java/br/com/centralit/api/dao/ConfiguracaoDao.java
... ... @@ -1,38 +0,0 @@
1   -package br.com.centralit.api.dao;
2   -
3   -import br.com.centralit.framework.dao.arquitetura.CitGenericDAO;
4   -import br.com.centralit.framework.model.Usuario;
5   -
6   -/**
7   - * <p><img src="http://centralit.com.br/images/logo_central.png"></p>
8   - *
9   - * <p><b>Company: </b> Central IT - Governança Corporativa - </p>
10   - *
11   - * <p><b>Title: ConfiguracaoDao </b></p>
12   - *
13   - * <p><b>Description: </b></p>
14   - *
15   - * <p><b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a></p>
16   - *
17   - * <p><b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a></p>
18   - *
19   - * @since 09/01/2015 - 13:15:56
20   - *
21   - * @version 1.0.0
22   - *
23   - * @author rogerio.cassimiro
24   - *
25   - */
26   -public interface ConfiguracaoDao extends CitGenericDAO {
27   -
28   - /**
29   - *
30   - * Método responsável por
31   - *
32   - * @author wilker.machado
33   - *
34   - * @param idContaContabil
35   - * @param usuarioLogado
36   - * @return
37   - */
38   - boolean existeContaContabilVinculadoACOnfiguracao(Long idContaContabil, Usuario usuarioLogado);}
cit-adm-materiais-api/src/main/java/br/com/centralit/api/dao/impl/ConfiguracaoDaoHibernate.java
... ... @@ -1,66 +0,0 @@
1   -package br.com.centralit.api.dao.impl;
2   -
3   -import br.com.centralit.api.dao.ConfiguracaoDao;
4   -
5   -import org.springframework.stereotype.Repository;
6   -
7   -import com.googlecode.genericdao.search.Filter;
8   -
9   -import br.com.centralit.framework.dao.arquitetura.CitGenericDAOImpl;
10   -import br.com.centralit.framework.dao.arquitetura.SearchSeven;
11   -import br.com.centralit.framework.model.Configuracao;
12   -import br.com.centralit.framework.model.Usuario;
13   -
14   -/**
15   - * <p>
16   - * <img src="http://centralit.com.br/images/logo_central.png">
17   - * </p>
18   - *
19   - * <p>
20   - * <b>Company: </b> Central IT - Governança Corporativa -
21   - * </p>
22   - *
23   - * <p>
24   - * <b>Title: ConfiguracaoDaoHibernate</b>
25   - * </p>
26   - *
27   - * <p>
28   - * <b>Description: </b>
29   - * </p>
30   - *
31   - * <p>
32   - * <b>Iniciativa(s):</b> <a href="LINK_PORTAL">NUMERO_INICIATIVA</a>
33   - * </p>
34   - *
35   - * <p>
36   - * <b>Regra(s) de negócio:</b> <a href="LINK_PORTAL">NUMERO_REGRA_DE_NEGOCIO</a>
37   - * </p>
38   - *
39   - * @since 09/01/2015 - 13:16:29
40   - *
41   - * @version 1.0.0
42   - *
43   - * @author rogerio.cassimiro
44   - *
45   - */
46   -@Repository("configuracaoDao")
47   -public class ConfiguracaoDaoHibernate extends CitGenericDAOImpl implements ConfiguracaoDao {
48   -
49   - public ConfiguracaoDaoHibernate() {
50   -
51   - super(Configuracao.class);
52   - }
53   -
54   - /**
55   - * {@inheritDoc}
56   - */
57   - @Override
58   - public boolean existeContaContabilVinculadoACOnfiguracao(Long idContaContabil, Usuario usuarioLogado) {
59   -
60   - SearchSeven searchSeven = new SearchSeven();
61   -
62   - searchSeven.addFilterOr(Filter.equal("contaContabilAlmoxarifado.id", idContaContabil), Filter.equal("contaContabilExtraviado.id", idContaContabil));
63   -
64   - return this.count(searchSeven) > 0;
65   - }
66   -}