Guest User

Untitled

a guest
Oct 19th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. @ManyToMany
  2. @JoinTable(name = "ETAPA_ENVOLVIDOS", joinColumns = @JoinColumn(name = "etapa_id"), inverseJoinColumns = @JoinColumn(name = "conta_id"))
  3. private Set<Conta> envolvidos = new HashSet<>();
  4.  
  5. public void removerEnvolvido(Conta conta) {
  6. this.envolvidos.remove(conta);
  7. }
  8.  
  9. public void removerTodosEnvolvidos() {
  10. if(!this.envolvidos.isEmpty()) {
  11. for (Conta aux : this.envolvidos) {
  12. removerEnvolvido(aux);
  13. }
  14. }
  15. }
Add Comment
Please, Sign In to add comment