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.framework.core.util.VerificadorUtil; |
||
| 7 | import br.gov.al.saude.srv.model.FormaIngresso; |
||
| 8 | import br.gov.al.saude.test.util.formatador.impl.AbstractFormatadorDeMensagem; |
||
| 9 | |||
| 10 | public class FormatadorFormaIngresso extends |
||
| 11 | AbstractFormatadorDeMensagem<FormaIngresso> { |
||
| 12 | |||
| 13 | private static final String PADRAO_FORMA_INGRESSO ="Código:''{0}'', Descrição:''{1}'', Tipo Vínculo:''{2}''"; |
||
| 14 | |||
| 15 | @Override |
||
| 16 | protected List<Object> gerarParametros(FormaIngresso formaIngresso) { |
||
| 17 | List<Object> listaParametros = new ArrayList<Object>(); |
||
| 18 | listaParametros.add(VerificadorUtil.estaNulo(formaIngresso.getCodigo()) ? "" : formaIngresso.getCodigo().toString()); |
||
| 19 | listaParametros.add(formaIngresso.getDescricao()); |
||
| 20 | listaParametros.add(formaIngresso.getTipoVinculo()); |
||
| 21 | |||
| 22 | return listaParametros; |
||
| 23 | } |
||
| 24 | |||
| 25 | @Override |
||
| 26 | protected String obterPadrao() { |
||
| 27 | return PADRAO_FORMA_INGRESSO; |
||
| 28 | } |
||
| 29 | } |