Guest User

jacksonModelo2

a guest
Apr 24th, 2015
213
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package model;
  2.  
  3. import com.fasterxml.jackson.annotation.JsonIdentityInfo;
  4. import com.fasterxml.jackson.annotation.JsonProperty;
  5. import com.fasterxml.jackson.annotation.ObjectIdGenerators;
  6.  
  7.  
  8. @JsonIdentityInfo(generator=ObjectIdGenerators.PropertyGenerator.class, property="id",scope = Marca.class)
  9. public class Modelo {
  10. @JsonProperty("id")
  11. private Long CodModelo;
  12. private String DescricaoModelo;
  13.  
  14. private Marca marca;
  15.  
  16. public Marca getMarca() {
  17. return marca;
  18. }
  19.  
  20. public void setMarca(Marca marca) {
  21. this.marca = marca;
  22. }
  23.  
  24.  
  25. public Long getCodModelo() {
  26. return CodModelo;
  27. }
  28.  
  29. public void setCodModelo(Long CodModelo) {
  30. this.CodModelo = CodModelo;
  31. }
  32.  
  33. public String getDescricaoModelo() {
  34. return DescricaoModelo;
  35. }
  36.  
  37. public void setDescricaoModelo(String DescricaoModelo) {
  38. this.DescricaoModelo = DescricaoModelo;
  39. }
  40. }
RAW Paste Data