File tree Expand file tree Collapse file tree 3 files changed +53
-6
lines changed
src/main/java/com/gdsc/springbootworkshop Expand file tree Collapse file tree 3 files changed +53
-6
lines changed Original file line number Diff line number Diff line change 1
1
package com .gdsc .springbootworkshop .entites ;
2
2
3
- import org .springframework .data .annotation .Id ;
4
3
5
4
import javax .persistence .*;
6
5
7
6
@ Entity
8
7
public class Student {
9
- @ javax .persistence .Id
10
- @ GeneratedValue (strategy = GenerationType .AUTO )
11
- private Long id ;
8
+
12
9
13
10
@ Id
14
11
@ GeneratedValue (strategy = GenerationType .AUTO )
@@ -23,11 +20,11 @@ public class Student {
23
20
private GENDER gender ;
24
21
25
22
public Long getId () {
26
- return id ;
23
+ return idStudent ;
27
24
}
28
25
29
26
public void setId (Long id ) {
30
- this .id = id ;
27
+ this .idStudent = id ;
31
28
}
32
29
33
30
public Student () {
Original file line number Diff line number Diff line change
1
+ package com .gdsc .springbootworkshop .services ;
2
+
3
+ import com .gdsc .springbootworkshop .entites .Student ;
4
+
5
+ import java .util .List ;
6
+
7
+ public interface IStudentService {
8
+
9
+ List <Student > getAllStudents ();
10
+ Student addStudent (Student student );
11
+ Student updateStudent (Long id ,Student student );
12
+ void deleteStudent (Long id );
13
+ Student findById (Long id );
14
+ }
Original file line number Diff line number Diff line change
1
+ package com .gdsc .springbootworkshop .services ;
2
+
3
+ import com .gdsc .springbootworkshop .entites .Student ;
4
+ import org .springframework .stereotype .Service ;
5
+
6
+ import java .util .List ;
7
+
8
+ @ Service
9
+ public class StudentService implements IStudentService {
10
+
11
+
12
+ @ Override
13
+ public List <Student > getAllStudents () {
14
+ return null ;
15
+ }
16
+
17
+ @ Override
18
+ public Student addStudent (Student student ) {
19
+ return null ;
20
+ }
21
+
22
+ @ Override
23
+ public Student updateStudent (Long id , Student student ) {
24
+ return null ;
25
+ }
26
+
27
+ @ Override
28
+ public void deleteStudent (Long id ) {
29
+
30
+ }
31
+
32
+ @ Override
33
+ public Student findById (Long id ) {
34
+ return null ;
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments