Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | package br.gov.al.saude.test.formatador; |
| 2 | |||
| 3 | import java.util.ArrayList; |
||
| 4 | import java.util.List; |
||
| 5 | |||
| 6 | import br.gov.al.saude.srv.model.Cargo; |
||
| 7 | import br.gov.al.saude.test.util.formatador.impl.AbstractFormatadorDeMensagem; |
||
| 8 | |||
| 9 | public class FormatadorCargo extends AbstractFormatadorDeMensagem<Cargo> { |
||
| 10 | |||
| 11 | private static final String PADRAO_CARGO = "Descricao: ''{0}'', Quantidade de Vagas: ''{1}'', Graus de Instrução: ''{2}'', Ativo: ''{3}''"; |
||
| 12 | |||
| 13 | @Override |
||
| 14 | protected List<Object> gerarParametros(Cargo cargo) { |
||
| 15 | List<Object> listaParametros = new ArrayList<Object>(); |
||
| 16 | listaParametros.add(cargo.getDescricao()); |
||
| 17 | listaParametros.add(cargo.getQuantidadeVagas()); |
||
| 18 | listaParametros.add(cargo.getGrauInstrucao().getDescricao()); |
||
| 19 | listaParametros.add(cargo.getDescricaoAtivo()); |
||
| 20 | |||
| 21 | return listaParametros; |
||
| 22 | } |
||
| 23 | |||
| 24 | @Override |
||
| 25 | protected String obterPadrao() { |
||
| 26 | return PADRAO_CARGO; |
||
| 27 | } |
||
| 28 | } |