PostulanteTecnologia.java 1.46 KB
Newer Older
1 2
package com.roshka.modelo;

willgonzz committed
3
import javax.persistence.CascadeType;
4 5 6 7 8
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
Javier Ferreira committed
9 10
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
11
import javax.persistence.Table;
12 13 14
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
15 16

import com.fasterxml.jackson.annotation.JsonBackReference;
17 18 19
@Entity 
@Table(name="postulante_tecnologia")

20
public class PostulanteTecnologia {
21 22
   @Id 
   @GeneratedValue(strategy = GenerationType.AUTO)
23
   @Column(name="id")
24
   private long id ;
25

26
   @Column(name="nivel")
27 28
   @Min(value = 1)
   @Max(value = 5)
29
   private Long nivel;
willgonzz committed
30
    @ManyToOne(cascade = CascadeType.PERSIST)
Javier Ferreira committed
31 32
    @JoinColumn
   private Tecnologia tecnologia;
33 34

    @ManyToOne()
Javier Ferreira committed
35
   @JoinColumn
36
   @JsonBackReference
37
    private Postulante postulante;
38 39 40 41 42 43 44 45 46 47 48 49
public long getId() {
    return id;
}
public void setId(long id) {
    this.id = id;
}
public Long getNivel() {
    return nivel;
}
public void setNivel(Long nivel) {
    this.nivel = nivel;
}
Javier Ferreira committed
50 51
public Tecnologia getTecnologia() {
    return tecnologia;
52
}
Javier Ferreira committed
53 54
public void setTecnologia(Tecnologia tecnologia) {
    this.tecnologia = tecnologia;
55
}
Javier Ferreira committed
56
public Postulante getPostulante() {
57 58
    return postulante;
}
Javier Ferreira committed
59
public void setPostulante(Postulante postulante) {
60 61 62 63 64 65 66 67
    this.postulante = postulante;
}






Javier Ferreira committed
68 69


70
}