Advertisement
Guest User

Marca.java

a guest
Apr 12th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package model;
  7.  
  8. import java.io.Serializable;
  9. import java.util.Date;
  10. import java.util.List;
  11. import javax.persistence.Entity;
  12. import javax.persistence.Id;
  13. import javax.persistence.OneToMany;
  14. import javax.persistence.Temporal;
  15. import javax.persistence.TemporalType;
  16.  
  17.  
  18. /**
  19. *
  20. * @author Alex
  21. */
  22. @Entity
  23. public class Marca implements Serializable {
  24. @Id
  25. private Long CodMarca;
  26. private String NomeMarca;
  27.  
  28. @Temporal(TemporalType.DATE)
  29. private Date dtfundacao;
  30.  
  31. public Date getDtfundacao() {
  32. return dtfundacao;
  33. }
  34.  
  35. @OneToMany(mappedBy = "marca")
  36. private List<Modelo> modelos;
  37.  
  38. public List<Modelo> getModelos() {
  39. return modelos;
  40. }
  41.  
  42.  
  43. public void setDtfundacao(Date dtfundacao) {
  44. this.dtfundacao = dtfundacao;
  45. }
  46.  
  47.  
  48. public Long getCodMarca() {
  49. return CodMarca;
  50. }
  51.  
  52. public void setCodMarca(Long CodMarca) {
  53. this.CodMarca = CodMarca;
  54. }
  55.  
  56. public String getNomeMarca() {
  57. return NomeMarca;
  58. }
  59.  
  60. public void setNomeMarca(String NomeMarca) {
  61. this.NomeMarca = NomeMarca;
  62. }
  63.  
  64.  
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement