Commit d4f56129e1baebe93bdb111a2cc323028ee6222a
1 parent
1d9ae5a5
Exists in
master
and in
1 other branch
Teste de omissão de variáveis com valores nulos.
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
src/main/java/br/gov/ans/integracao/sei/modelo/DocumentoResumido.java
@@ -9,6 +9,8 @@ import javax.persistence.Id; | @@ -9,6 +9,8 @@ import javax.persistence.Id; | ||
9 | import javax.persistence.SqlResultSetMapping; | 9 | import javax.persistence.SqlResultSetMapping; |
10 | import javax.xml.bind.annotation.XmlRootElement; | 10 | import javax.xml.bind.annotation.XmlRootElement; |
11 | 11 | ||
12 | +import org.codehaus.jackson.map.annotate.JsonSerialize; | ||
13 | + | ||
12 | @XmlRootElement | 14 | @XmlRootElement |
13 | @Entity | 15 | @Entity |
14 | @SqlResultSetMapping(name = "DocumentoResumidoMapping", entities = { @EntityResult(entityClass = DocumentoResumido.class, fields = { | 16 | @SqlResultSetMapping(name = "DocumentoResumidoMapping", entities = { @EntityResult(entityClass = DocumentoResumido.class, fields = { |
@@ -17,6 +19,7 @@ import javax.xml.bind.annotation.XmlRootElement; | @@ -17,6 +19,7 @@ import javax.xml.bind.annotation.XmlRootElement; | ||
17 | @FieldResult(name = "numeroInformado", column = "numeroInformado"), | 19 | @FieldResult(name = "numeroInformado", column = "numeroInformado"), |
18 | @FieldResult(name = "origem", column = "origem"), | 20 | @FieldResult(name = "origem", column = "origem"), |
19 | @FieldResult(name = "dataGeracao", column = "dataGeracao") }) }) | 21 | @FieldResult(name = "dataGeracao", column = "dataGeracao") }) }) |
22 | +@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL) | ||
20 | public class DocumentoResumido { | 23 | public class DocumentoResumido { |
21 | @Id | 24 | @Id |
22 | private String numero; | 25 | private String numero; |