Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package modelo;
- import java.io.Serializable;
- import java.util.List;
- import javax.persistence.*;
- @Entity
- @Table (name="depto")
- public class Depto implements Serializable {
- @Id
- @Column(name="id")
- @GeneratedValue(strategy = GenerationType.AUTO, generator = "depto_seq_gen")
- @SequenceGenerator(name = "depto_seq_gen", sequenceName = "depto_id_seq")
- private Long id;
- private String nome;
- @ManyToMany(mappedBy = "deptos")
- private List<Funcionario> funcionarios;
- public List<Funcionario> getFuncionarios() {
- return funcionarios;
- }
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getNome() {
- return nome;
- }
- public void setNome(String nome) {
- this.nome = nome;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement