Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.srv.core.domain; |
| 2 | |||
| 3 | import static br.gov.al.saude.test.ConstantesTestHelper.ATIVO_NAO; |
||
| 4 | import static br.gov.al.saude.test.ConstantesTestHelper.ATIVO_SIM; |
||
| 5 | import static br.gov.al.saude.test.ConstantesTestHelper.FuncaoConstantes.DESCRICAO_FUNCAO_ASSESSOR_TECNICO; |
||
| 6 | import static br.gov.al.saude.test.ConstantesTestHelper.FuncaoConstantes.NIVEL_GTR7; |
||
| 7 | import static br.gov.al.saude.test.ConstantesTestHelper.FuncaoConstantes.QUANTIDADE_VAGAS_2; |
||
| 8 | import static br.gov.al.saude.test.ConstantesTestHelper.FuncaoConstantes.QUANTIDADE_VAGAS_NAO_INFORMADA; |
||
| 9 | import static br.gov.al.saude.test.ConstantesTestHelper.FuncaoConstantes.SEQUENCIAL_FUNCAO_CHEFE_13; |
||
| 10 | import static br.gov.al.saude.test.ConstantesTestHelper.FuncaoConstantes.TIPO_CARGO_COMISSIONADO_C; |
||
| 11 | import static br.gov.al.saude.test.ConstantesTestHelper.FuncaoConstantes.TIPO_FUNCAO_GRATIFICADA_F; |
||
| 12 | import static br.gov.al.saude.test.ConstantesTestHelper.MensagensRetorno.NAO_EH_POSSIVEL_INATIVAR_FUNCAO; |
||
| 13 | |||
| 14 | import java.util.ArrayList; |
||
| 15 | import java.util.List; |
||
| 16 | |||
| 17 | import org.jmock.Expectations; |
||
| 18 | import org.junit.Before; |
||
| 19 | import org.junit.Test; |
||
| 20 | |||
| 21 | import br.gov.al.saude.framework.core.consulta.restricao.Restricoes; |
||
| 22 | import br.gov.al.saude.framework.core.generic.GenericRepository; |
||
| 23 | import br.gov.al.saude.framework.core.generic.GenericService; |
||
| 24 | import br.gov.al.saude.framework.core.interfaces.Alterar; |
||
| 25 | import br.gov.al.saude.framework.core.interfaces.Cadastrar; |
||
| 26 | import br.gov.al.saude.framework.core.util.VerificadorUtil; |
||
| 27 | import br.gov.al.saude.framework.core.validador.Validador; |
||
| 28 | import br.gov.al.saude.srv.core.domain.funcao.FuncaoService; |
||
| 29 | import br.gov.al.saude.srv.core.domain.funcao.impl.FuncaoServiceImpl; |
||
| 30 | import br.gov.al.saude.srv.core.infrastructure.persistence.jpa.funcao.FuncaoRepository; |
||
| 31 | import br.gov.al.saude.srv.core.infrastructure.persistence.jpa.servidor.ServidorRepository; |
||
| 32 | import br.gov.al.saude.srv.model.Funcao; |
||
| 33 | import br.gov.al.saude.srv.model.dto.ParametroConsultaFuncaoDTO; |
||
| 34 | import br.gov.al.saude.srv.model.enums.TipoFuncao; |
||
| 35 | import br.gov.al.saude.test.builder.FuncaoBuilder; |
||
| 36 | import br.gov.al.saude.test.unidade.generic.service.ServiceImplTest; |
||
| 37 | import br.gov.al.saude.test.util.CommandSemMensagem; |
||
| 38 | import br.gov.al.saude.test.util.VerificadorLancamentoException; |
||
| 39 | |||
| 40 | public class FuncaoServiceImplTest extends ServiceImplTest<Funcao> { |
||
| 41 | |||
| 42 | private static final String OBRIGATÓRIO_INFORMAR_QUANTIDADE_DE_VAGAS = "Obrigatório informar quantidade de vagas."; |
||
| 43 | private FuncaoService funcaoService; |
||
| 44 | private FuncaoRepository funcaoRepositoryMock; |
||
| 45 | private ServidorRepository servidorRepositoryMock; |
||
| 46 | private ParametroConsultaFuncaoDTO parametroConsultaFuncaoDTO; |
||
| 47 | private Funcao funcao; |
||
| 48 | private List<Funcao> funcoes; |
||
| 49 | |||
| 50 | @Before |
||
| 51 | public void inicializarContexto() { |
||
| 52 | funcaoRepositoryMock = getContexto().mock(FuncaoRepository.class); |
||
| 53 | servidorRepositoryMock = getContexto().mock(ServidorRepository.class); |
||
| 54 | validadorMock = getContexto().mock(Validador.class); |
||
| 55 | funcaoService = new FuncaoServiceImpl(validadorMock, funcaoRepositoryMock, servidorRepositoryMock); |
||
| 56 | parametroConsultaFuncaoDTO = new ParametroConsultaFuncaoDTO(DESCRICAO_FUNCAO_ASSESSOR_TECNICO, NIVEL_GTR7, TipoFuncao.FUNCAO_GRATIFICADA, true,0, Integer.MAX_VALUE); |
||
| 57 | funcao = new FuncaoBuilder() |
||
| 58 | .comDescricao(DESCRICAO_FUNCAO_ASSESSOR_TECNICO) |
||
| 59 | .comNivel(NIVEL_GTR7) |
||
| 60 | .comTipoFuncao(TIPO_FUNCAO_GRATIFICADA_F) |
||
| 61 | .comQuantidadeVagas(QUANTIDADE_VAGAS_NAO_INFORMADA) |
||
| 62 | .comAtivo(ATIVO_NAO) |
||
| 63 | .build(); |
||
| 64 | setEntidade(funcao); |
||
| 65 | funcoes = new ArrayList<Funcao>(); |
||
| 66 | funcoes.add(funcao); |
||
| 67 | } |
||
| 68 | |||
| 69 | @Override |
||
| 70 | protected GenericService<Funcao> getService() { |
||
| 71 | return funcaoService; |
||
| 72 | } |
||
| 73 | |||
| 74 | @Override |
||
| 75 | protected GenericRepository<Funcao> getRepositoryMock() { |
||
| 76 | return funcaoRepositoryMock; |
||
| 77 | } |
||
| 78 | |||
| 79 | @Test |
||
| 80 | public void aoConsultarFuncaoDeveriaDelegarParaOhRepositorio() { |
||
| 81 | getContexto().checking(new Expectations(){{ |
||
| 82 | oneOf(funcaoRepositoryMock).consultar(parametroConsultaFuncaoDTO); |
||
| 83 | }}); |
||
| 84 | |||
| 85 | ((FuncaoService) getService()).consultar(parametroConsultaFuncaoDTO); |
||
| 86 | } |
||
| 87 | |||
| 88 | @Test |
||
| 89 | public void aoObterQuantideRegistrosConsultarFuncoesAtivasDeveriaDelegarParaOhRepositorio() { |
||
| 90 | getContexto().checking(new Expectations(){{ |
||
| 91 | oneOf(funcaoRepositoryMock).obterQuantideRegistrosConsultarFuncoesAtivas(parametroConsultaFuncaoDTO); |
||
| 92 | }}); |
||
| 93 | |||
| 94 | funcaoService.obterQuantideRegistrosConsultarFuncoesAtivas(parametroConsultaFuncaoDTO); |
||
| 95 | } |
||
| 96 | |||
| 97 | @Test |
||
| 98 | public void aoConsultarFuncoesAtivasDeveriaDelegarParaOhRepositorio() { |
||
| 99 | getContexto().checking(new Expectations(){{ |
||
| 100 | oneOf(funcaoRepositoryMock).consultarFuncoesAtivas(parametroConsultaFuncaoDTO); |
||
| 101 | }}); |
||
| 102 | |||
| 103 | funcaoService.consultarFuncoesAtivas(parametroConsultaFuncaoDTO); |
||
| 104 | } |
||
| 105 | |||
| 106 | @Test |
||
| 107 | public void aoObterQuantidadeDeRegistrosDeveriaDelegarParaOhRepositorio() { |
||
| 108 | getContexto().checking(new Expectations(){{ |
||
| 109 | oneOf(funcaoRepositoryMock).obterQuantidadeDeRegistros(parametroConsultaFuncaoDTO); |
||
| 110 | }}); |
||
| 111 | |||
| 112 | funcaoService.obterQuantidadeDeRegistros(parametroConsultaFuncaoDTO); |
||
| 113 | } |
||
| 114 | |||
| 115 | @Test |
||
| 116 | public void aoCadastrarFuncaoCargoComissionadoSemQuantidadeDeVagasDeveriaLancarExcecao() throws Exception { |
||
| 117 | final Funcao funcaoAssessor = new FuncaoBuilder() |
||
| 118 | .comDescricao(DESCRICAO_FUNCAO_ASSESSOR_TECNICO) |
||
| 119 | .comNivel(NIVEL_GTR7) |
||
| 120 | .comTipoFuncao(TIPO_CARGO_COMISSIONADO_C) |
||
| 121 | .comQuantidadeVagas(QUANTIDADE_VAGAS_NAO_INFORMADA) |
||
| 122 | .build(); |
||
| 123 | |||
| 124 | getContexto().checking(new Expectations(){{ |
||
| 125 | ignoring(validadorMock).validar(with(funcaoAssessor), with(new Class<?>[]{Cadastrar.class})); |
||
| 126 | ignoring(funcaoRepositoryMock).consultarPassandoRestricoes(with(funcaoAssessor), |
||
| 127 | with(any(Integer.class)), with(any(Integer.class)), with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(funcaoAssessor))); |
||
| 128 | never(getRepositoryMock()).cadastrar(with(getEntidade())); |
||
| 129 | }}); |
||
| 130 | |||
| 131 | VerificadorLancamentoException.verificarMensagemLancamentoExceptionSemRetornoMensagem(new CommandSemMensagem() { |
||
| 132 | @Override |
||
| 133 | public void execute() throws Exception { |
||
| 134 | funcaoService.cadastrar(funcaoAssessor); |
||
| 135 | } |
||
| 136 | |||
| 137 | }, OBRIGATÓRIO_INFORMAR_QUANTIDADE_DE_VAGAS); |
||
| 138 | } |
||
| 139 | |||
| 140 | @Test |
||
| 141 | public void aoCadastrarFuncaoCargoGratificadaComQuantidadeDeVagasDeveriaLancarExcecao() throws Exception { |
||
| 142 | final Funcao funcaoAssessor = new FuncaoBuilder() |
||
| 143 | .comDescricao(DESCRICAO_FUNCAO_ASSESSOR_TECNICO) |
||
| 144 | .comNivel(NIVEL_GTR7) |
||
| 145 | .comTipoFuncao(TIPO_FUNCAO_GRATIFICADA_F) |
||
| 146 | .comQuantidadeVagas(QUANTIDADE_VAGAS_2) |
||
| 147 | .build(); |
||
| 148 | |||
| 149 | getContexto().checking(new Expectations(){{ |
||
| 150 | ignoring(validadorMock).validar(with(funcaoAssessor), with(new Class<?>[]{Cadastrar.class})); |
||
| 151 | ignoring(funcaoRepositoryMock).consultarPassandoRestricoes(with(funcaoAssessor), |
||
| 152 | with(any(Integer.class)), with(any(Integer.class)), with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(funcaoAssessor))); |
||
| 153 | never(getRepositoryMock()).cadastrar(with(getEntidade())); |
||
| 154 | oneOf(funcaoRepositoryMock).cadastrar(with(getEntidade())); |
||
| 155 | }}); |
||
| 156 | |||
| 157 | funcaoService.cadastrar(funcaoAssessor); |
||
| 158 | } |
||
| 159 | |||
| 160 | @Test |
||
| 161 | public void aoCadastrarFuncaoCargoGratificadaSemQuantidadeDeVagasDeveriaLancarExcecao() throws Exception { |
||
| 162 | final Funcao funcaoAssessor = new FuncaoBuilder() |
||
| 163 | .comDescricao(DESCRICAO_FUNCAO_ASSESSOR_TECNICO) |
||
| 164 | .comNivel(NIVEL_GTR7) |
||
| 165 | .comTipoFuncao(TIPO_FUNCAO_GRATIFICADA_F) |
||
| 166 | .comQuantidadeVagas(QUANTIDADE_VAGAS_NAO_INFORMADA) |
||
| 167 | .build(); |
||
| 168 | |||
| 169 | getContexto().checking(new Expectations(){{ |
||
| 170 | ignoring(validadorMock).validar(with(funcaoAssessor), with(new Class<?>[]{Cadastrar.class})); |
||
| 171 | ignoring(funcaoRepositoryMock).consultarPassandoRestricoes(with(funcaoAssessor), |
||
| 172 | with(any(Integer.class)), with(any(Integer.class)), with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(funcaoAssessor))); |
||
| 173 | never(getRepositoryMock()).cadastrar(with(getEntidade())); |
||
| 174 | oneOf(funcaoRepositoryMock).cadastrar(with(getEntidade())); |
||
| 175 | }}); |
||
| 176 | |||
| 177 | funcaoService.cadastrar(funcaoAssessor); |
||
| 178 | } |
||
| 179 | |||
| 180 | @Test |
||
| 181 | public void aoCadastrarFuncaoDeveriaDelegarParaOhRepositorioConsultarFuncaoPorNivel() throws Exception { |
||
| 182 | getContexto().checking(new Expectations(){{ |
||
| 183 | ignoring(validadorMock).validar(with(funcao), with(new Class<?>[]{Cadastrar.class})); |
||
| 184 | oneOf(funcaoRepositoryMock).consultarPassandoRestricoes(with(getEntidade()), |
||
| 185 | with(any(Integer.class)), with(any(Integer.class)), with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(getEntidade()))); |
||
| 186 | will(returnValue(null)); |
||
| 187 | ignoring(getRepositoryMock()).cadastrar(with(getEntidade())); |
||
| 188 | }}); |
||
| 189 | |||
| 190 | funcaoService.cadastrar(funcao); |
||
| 191 | } |
||
| 192 | |||
| 193 | @Test |
||
| 194 | public void aoCadastrarFuncaoComNivelJaCadastradoDeveriaLancarExcessao() throws Exception { |
||
| 195 | getContexto().checking(new Expectations(){{ |
||
| 196 | ignoring(validadorMock).validar(with(funcao), with(new Class<?>[]{Cadastrar.class})); |
||
| 197 | oneOf(funcaoRepositoryMock).consultarPassandoRestricoes(with(getEntidade()), |
||
| 198 | with(any(Integer.class)), with(any(Integer.class)), with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(getEntidade()))); |
||
| 199 | will(returnValue(funcoes)); |
||
| 200 | never(getRepositoryMock()).cadastrar(with(getEntidade())); |
||
| 201 | }}); |
||
| 202 | |||
| 203 | VerificadorLancamentoException.verificarMensagemLancamentoExceptionSemRetornoMensagem(new CommandSemMensagem() { |
||
| 204 | @Override |
||
| 205 | public void execute() throws Exception { |
||
| 206 | funcaoService.cadastrar(funcao); |
||
| 207 | } |
||
| 208 | |||
| 209 | }, "Nível já cadastrado."); |
||
| 210 | } |
||
| 211 | |||
| 212 | @Test |
||
| 213 | public void aoAlterarFuncaoCargoComissionadoSemQuantidadeDeVagasDeveriaLancarExcecao() throws Exception { |
||
| 214 | final Funcao funcaoAssessor = new FuncaoBuilder() |
||
| 215 | .comCodigo(SEQUENCIAL_FUNCAO_CHEFE_13) |
||
| 216 | .comDescricao(DESCRICAO_FUNCAO_ASSESSOR_TECNICO) |
||
| 217 | .comNivel(NIVEL_GTR7) |
||
| 218 | .comTipoFuncao(TIPO_CARGO_COMISSIONADO_C) |
||
| 219 | .comQuantidadeVagas(QUANTIDADE_VAGAS_NAO_INFORMADA) |
||
| 220 | .comAtivo(ATIVO_SIM) |
||
| 221 | .build(); |
||
| 222 | |||
| 223 | getContexto().checking(new Expectations(){{ |
||
| 224 | ignoring(validadorMock).validar(with(funcaoAssessor), with(new Class<?>[]{Alterar.class})); |
||
| 225 | ignoring(funcaoRepositoryMock).consultarPassandoRestricoes(with(funcaoAssessor), |
||
| 226 | with(any(Integer.class)), with(any(Integer.class)), with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(funcaoAssessor))); |
||
| 227 | ignoring(servidorRepositoryMock).consultarSeExisteDadoFuncionalPassandoRestricoes(with(gerarListaRestricoesConsultaDadoFuncionalPorFuncao())); |
||
| 228 | never(getRepositoryMock()).alterar(with(getEntidade())); |
||
| 229 | }}); |
||
| 230 | |||
| 231 | VerificadorLancamentoException.verificarMensagemLancamentoExceptionSemRetornoMensagem(new CommandSemMensagem() { |
||
| 232 | @Override |
||
| 233 | public void execute() throws Exception { |
||
| 234 | funcaoService.alterar(funcaoAssessor); |
||
| 235 | } |
||
| 236 | |||
| 237 | }, OBRIGATÓRIO_INFORMAR_QUANTIDADE_DE_VAGAS); |
||
| 238 | } |
||
| 239 | |||
| 240 | @Test |
||
| 241 | public void aoAlterarFuncaoDeveriaDelegarParaOhRepositorioConsultarFuncaoPorNivel() throws Exception { |
||
| 242 | getEntidade().setCodigo(new Integer(SEQUENCIAL_FUNCAO_CHEFE_13)); |
||
| 243 | getEntidade().setAtivo(true); |
||
| 244 | |||
| 245 | getContexto().checking(new Expectations(){{ |
||
| 246 | ignoring(validadorMock).validar(with(funcao), with(new Class<?>[]{Alterar.class})); |
||
| 247 | oneOf(funcaoRepositoryMock).consultarPassandoRestricoes(with(getEntidade()), |
||
| 248 | with(any(Integer.class)), with(any(Integer.class)), with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(getEntidade()))); |
||
| 249 | will(returnValue(null)); |
||
| 250 | ignoring(servidorRepositoryMock).consultarSeExisteDadoFuncionalPassandoRestricoes(with(gerarListaRestricoesConsultaDadoFuncionalPorFuncao())); |
||
| 251 | ignoring(getRepositoryMock()).alterar(with(getEntidade())); |
||
| 252 | }}); |
||
| 253 | |||
| 254 | funcaoService.alterar(funcao); |
||
| 255 | } |
||
| 256 | |||
| 257 | @Test |
||
| 258 | public void aoAlterarFuncaoComNivelJaCadastradoDeveriaLancarExcecao() throws Exception { |
||
| 259 | getEntidade().setCodigo(new Integer(SEQUENCIAL_FUNCAO_CHEFE_13)); |
||
| 260 | |||
| 261 | getContexto().checking(new Expectations(){{ |
||
| 262 | ignoring(validadorMock).validar(with(funcao), with(new Class<?>[]{Alterar.class})); |
||
| 263 | oneOf(funcaoRepositoryMock).consultarPassandoRestricoes(with(getEntidade()), |
||
| 264 | with(any(Integer.class)), with(any(Integer.class)), with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(getEntidade()))); |
||
| 265 | will(returnValue(funcoes)); |
||
| 266 | ignoring(servidorRepositoryMock).consultarSeExisteDadoFuncionalPassandoRestricoes(with(gerarListaRestricoesConsultaDadoFuncionalPorFuncao())); |
||
| 267 | never(getRepositoryMock()).alterar(with(getEntidade())); |
||
| 268 | }}); |
||
| 269 | |||
| 270 | VerificadorLancamentoException.verificarMensagemLancamentoExceptionSemRetornoMensagem(new CommandSemMensagem() { |
||
| 271 | @Override |
||
| 272 | public void execute() throws Exception { |
||
| 273 | funcaoService.alterar(funcao); |
||
| 274 | } |
||
| 275 | |||
| 276 | }, "Nível já cadastrado."); |
||
| 277 | } |
||
| 278 | |||
| 279 | @Test |
||
| 280 | public void aoAlterarFuncaoComoInativaComFuncaoVinculadaAhServidorDadoFuncionalDeveriaLancarExcecao() throws Exception { |
||
| 281 | getEntidade().setCodigo(new Integer(SEQUENCIAL_FUNCAO_CHEFE_13)); |
||
| 282 | getEntidade().setAtivo(false); |
||
| 283 | |||
| 284 | getContexto().checking(new Expectations(){{ |
||
| 285 | ignoring(validadorMock).validar(with(funcao), with(new Class<?>[]{Alterar.class})); |
||
| 286 | ignoring(funcaoRepositoryMock).consultarPassandoRestricoes(with(getEntidade()), with(any(Integer.class)), with(any(Integer.class)), |
||
| 287 | with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(getEntidade()))); |
||
| 288 | oneOf(servidorRepositoryMock).consultarSeExisteDadoFuncionalPassandoRestricoes(with(gerarListaRestricoesConsultaDadoFuncionalPorFuncao())); |
||
| 289 | will(returnValue(true)); |
||
| 290 | never(getRepositoryMock()).alterar(with(getEntidade())); |
||
| 291 | }}); |
||
| 292 | |||
| 293 | VerificadorLancamentoException.verificarMensagemLancamentoExceptionSemRetornoMensagem(new CommandSemMensagem() { |
||
| 294 | @Override |
||
| 295 | public void execute() throws Exception { |
||
| 296 | funcaoService.alterar(funcao); |
||
| 297 | } |
||
| 298 | |||
| 299 | }, NAO_EH_POSSIVEL_INATIVAR_FUNCAO); |
||
| 300 | } |
||
| 301 | |||
| 302 | @Override |
||
| 303 | protected void expectativasDeNegocioFuncionalidadeCadastrar() { |
||
| 304 | getContexto().checking(new Expectations(){{ |
||
| 305 | oneOf(funcaoRepositoryMock).consultarPassandoRestricoes(with(getEntidade()), |
||
| 306 | with(any(Integer.class)), with(any(Integer.class)), with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(getEntidade()))); |
||
| 307 | will(returnValue(new ArrayList<Funcao>())); |
||
| 308 | }}); |
||
| 309 | } |
||
| 310 | |||
| 311 | @Override |
||
| 312 | protected void expectativasDeNegocioFuncionalidadeAlterar() { |
||
| 313 | getContexto().checking(new Expectations(){{ |
||
| 314 | oneOf(funcaoRepositoryMock).consultarPassandoRestricoes(with(getEntidade()), |
||
| 315 | with(any(Integer.class)), with(any(Integer.class)), with(gerarRestricoesParaVerificacaoDeNivelJaCadastrado(getEntidade()))); |
||
| 316 | will(returnValue(new ArrayList<Funcao>())); |
||
| 317 | oneOf(servidorRepositoryMock).consultarSeExisteDadoFuncionalPassandoRestricoes(with(gerarListaRestricoesConsultaDadoFuncionalPorFuncao())); |
||
| 318 | will(returnValue(false)); |
||
| 319 | }}); |
||
| 320 | } |
||
| 321 | |||
| 322 | private List<Restricoes> gerarRestricoesParaVerificacaoDeNivelJaCadastrado(Funcao entidade) { |
||
| 323 | List<Restricoes> restricoes = new ArrayList<Restricoes>(); |
||
| 324 | adicionarRestricaoDiferenteDeCasoEntidadePossuaCodigo(entidade, restricoes); |
||
| 325 | adicionarRestricaoIgualParaNivel(entidade, restricoes); |
||
| 326 | return restricoes; |
||
| 327 | } |
||
| 328 | |||
| 329 | private void adicionarRestricaoIgualParaNivel(Funcao entidade, List<Restricoes> restricoes) { |
||
| 330 | restricoes.add(Restricoes.igual("nivel", entidade.getNivel())); |
||
| 331 | } |
||
| 332 | |||
| 333 | private void adicionarRestricaoDiferenteDeCasoEntidadePossuaCodigo(Funcao entidade, List<Restricoes> restricoes) { |
||
| 334 | if (VerificadorUtil.naoEstaNulo(entidade.getCodigo())) { |
||
| 335 | restricoes.add(Restricoes.diferenteDe("codigo", entidade.getCodigo())); |
||
| 336 | } |
||
| 337 | } |
||
| 338 | |||
| 339 | private List<Restricoes> gerarListaRestricoesConsultaDadoFuncionalPorFuncao() { |
||
| 340 | List<Restricoes> restricoes = new ArrayList<Restricoes>(); |
||
| 341 | restricoes.add(Restricoes.igual("funcao", getEntidade())); |
||
| 342 | return restricoes; |
||
| 343 | } |
||
| 344 | |||
| 345 | } |