Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
th-app-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oscar Enrique Gonzalez Escurra
th-app-java
Commits
b17b12ec
Commit
b17b12ec
authored
Nov 02, 2021
by
Cesar Giulano Gonzalez Maqueda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validaciones sobre models 2
parent
13b70dce
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
3 deletions
+50
-3
curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java
+14
-0
curriculumsearch/src/main/java/com/roshka/modelo/EstudioReconocimiento.java
+6
-0
curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java
+14
-0
curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java
+10
-2
curriculumsearch/src/main/java/com/roshka/modelo/Tecnologia.java
+2
-0
curriculumsearch/src/main/resources/static/main.js
+4
-1
No files found.
curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java
View file @
b17b12ec
...
...
@@ -12,6 +12,9 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.OneToMany
;
import
javax.persistence.Table
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Past
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
com.fasterxml.jackson.annotation.JsonManagedReference
;
...
...
@@ -22,17 +25,28 @@ public class Estudio {
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@Column
(
name
=
"id"
)
private
long
id
;
@Column
(
name
=
"tipo_de_studio"
)
@NotBlank
private
String
tipoDeEstudio
;
@Column
(
name
=
"institucion"
)
@NotBlank
private
String
institucion
;
@Column
(
name
=
"fecha_desde"
)
@NotNull
@Past
private
Date
fechaDesde
;
@Column
(
name
=
"fecha_hasta"
)
private
Date
fechaHasta
;
@Column
(
name
=
"referencias"
)
private
String
referencias
;
@Column
(
name
=
"titulo"
)
@NotBlank
private
String
titulo
;
@ManyToOne
...
...
curriculumsearch/src/main/java/com/roshka/modelo/EstudioReconocimiento.java
View file @
b17b12ec
...
...
@@ -9,6 +9,7 @@ import javax.persistence.Id;
import
javax.persistence.JoinColumn
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
javax.validation.constraints.NotBlank
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
...
...
@@ -19,10 +20,15 @@ public class EstudioReconocimiento {
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
@Column
(
name
=
"id"
)
private
Long
id
;
@Column
(
name
=
"nombre"
)
@NotBlank
private
String
nombre
;
@Column
(
name
=
"certificado"
)
@NotBlank
private
String
certificado
;
@JsonBackReference
@ManyToOne
@JoinColumn
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java
View file @
b17b12ec
...
...
@@ -14,6 +14,9 @@ import com.fasterxml.jackson.annotation.JsonBackReference;
import
com.fasterxml.jackson.annotation.JsonManagedReference
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Past
;
@Entity
@Table
(
name
=
"experiencia"
)
...
...
@@ -21,18 +24,29 @@ public class Experiencia {
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
private
long
id
;
@Column
(
name
=
"institucion"
)
@NotBlank
private
String
institucion
;
@Column
(
name
=
"fecha_desde"
)
@Past
@NotNull
private
Date
fechaDesde
;
@Column
(
name
=
"fecha_hasta"
)
private
Date
fechaHasta
;
@Column
(
name
=
"referencias"
)
private
String
referencias
;
@Column
(
name
=
"cargo"
)
@NotBlank
private
String
cargo
;
@Column
(
name
=
"descripcion"
)
private
String
descripcion
;
@JsonBackReference
@ManyToOne
(
optional
=
false
)
@JoinColumn
...
...
curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java
View file @
b17b12ec
...
...
@@ -8,6 +8,9 @@ import javax.persistence.Id;
import
javax.persistence.JoinColumn
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotBlank
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
@Entity
...
...
@@ -18,15 +21,20 @@ public class PostulanteTecnologia {
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
@Column
(
name
=
"id"
)
private
long
id
;
@Column
(
name
=
"nivel"
)
@Min
(
value
=
1
)
@Max
(
value
=
5
)
private
Long
nivel
;
@ManyToOne
()
@JoinColumn
private
Tecnologia
tecnologia
;
@ManyToOne
()
@ManyToOne
()
@JoinColumn
@JsonBackReference
private
Postulante
postulante
;
private
Postulante
postulante
;
public
long
getId
()
{
return
id
;
}
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Tecnologia.java
View file @
b17b12ec
...
...
@@ -6,6 +6,7 @@ import javax.persistence.GeneratedValue;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.validation.constraints.NotBlank
;
@Entity
@Table
(
name
=
"tecnologia"
)
...
...
@@ -16,6 +17,7 @@ public class Tecnologia {
private
long
id
;
@Column
(
name
=
"nombre"
)
@NotBlank
private
String
nombre
;
...
...
curriculumsearch/src/main/resources/static/main.js
View file @
b17b12ec
...
...
@@ -96,7 +96,9 @@ form.addEventListener("submit",(evt)=>{
postData
(
'postulante'
,
serializeJSON
(
form
))
.
then
(
response
=>
{
location
.
replace
(
response
.
url
);
if
(
response
.
status
==
200
||
response
.
status
==
302
){
location
.
replace
(
response
.
url
);
}
});
evt
.
preventDefault
();
}
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment