-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTelefone.java
54 lines (45 loc) · 1.21 KB
/
Telefone.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package br.com.projeto.curriculum.entidade;
import javax.persistence.Entity;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.persistence.*;
@Entity
public class Telefone {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Byte contadorTelefone;
@Id
@ManyToOne
@JoinColumn(name="idPessoa")
private Pessoa pessoa;
@NotNull(message="Campo Numero de Telefone não pode ficar em branco")
@Size(max=14, min=8)
private Long numeroTel;
@ManyToOne
@JoinColumn(name="idTipoTelefone")
private TipoTelefone tipoTelefone;
public Byte getContadorTelefone() {
return contadorTelefone;
}
public void setContadorTelefone(Byte contadorTelefone) {
this.contadorTelefone = contadorTelefone;
}
public Long getNumeroTel() {
return numeroTel;
}
public void setNumeroTel(Long numeroTel) {
this.numeroTel = numeroTel;
}
public TipoTelefone getTipoTelefone() {
return tipoTelefone;
}
public void setTipoTelefone(TipoTelefone tipoTelefone) {
this.tipoTelefone = tipoTelefone;
}
public Pessoa getPessoa() {
return pessoa;
}
public void setPessoa(Pessoa pessoa) {
this.pessoa = pessoa;
}
}