Advertisement
bisaggio

Untitled

Aug 2nd, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. public class Licenca implements Serializable {
  2. private static final long serialVersionUID = 1L;
  3. @Id
  4. @Basic(optional = false)
  5. @GeneratedValue
  6. @Column(name = "id", nullable = false)
  7. private Long id;
  8. @Temporal(TemporalType.TIMESTAMP)
  9. @Column(name = "data_fundacao")
  10. private Date dataFundacao;
  11. @ManyToMany(mappedBy = "licencas", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
  12. @Fetch(FetchMode.SUBSELECT)
  13. private List<UsuarioLicenca> usuarioLicencas = new ArrayList<>();
  14. }
  15.  
  16.  
  17. public class UsuarioLicenca implements Serializable {
  18. private static final long serialVersionUID = 1L;
  19. @Id
  20. @Basic(optional = false)
  21. @GeneratedValue
  22. @Column(name = "id", nullable = false)
  23. private Long id;
  24. @ManyToMany(mappedBy = "usuarioLicencas", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
  25. private List<Licenca> licencas;
  26. @Column(name = "uid_certificado", nullable = false)
  27. private String UIDCertificado;
  28. @Column(name = "seria_certificado", nullable = false)
  29. private String serialCertificado;
  30. @Column(name = "num_acessos", nullable = false)
  31. private Integer numeroAcessos;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement