Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Licenca implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @Basic(optional = false)
- @GeneratedValue
- @Column(name = "id", nullable = false)
- private Long id;
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name = "data_fundacao")
- private Date dataFundacao;
- @ManyToMany(mappedBy = "licencas", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- @Fetch(FetchMode.SUBSELECT)
- private List<UsuarioLicenca> usuarioLicencas = new ArrayList<>();
- }
- public class UsuarioLicenca implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @Basic(optional = false)
- @GeneratedValue
- @Column(name = "id", nullable = false)
- private Long id;
- @ManyToMany(mappedBy = "usuarioLicencas", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
- private List<Licenca> licencas;
- @Column(name = "uid_certificado", nullable = false)
- private String UIDCertificado;
- @Column(name = "seria_certificado", nullable = false)
- private String serialCertificado;
- @Column(name = "num_acessos", nullable = false)
- private Integer numeroAcessos;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement