Skip to content

Commit cde62d3

Browse files
committed
Adding getBooks and setStudentIdCard methods to Student class
1 parent 2381190 commit cde62d3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/com/example/demo/Student.java

+8
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ public void setAge(Integer age) {
140140
this.age = age;
141141
}
142142

143+
public List<Book> getBooks() {
144+
return books;
145+
}
146+
147+
public void setStudentIdCard(StudentIdCard studentIdCard) {
148+
this.studentIdCard = studentIdCard;
149+
}
150+
143151
//bidirectional relationship
144152
public void addBook(Book book) {
145153
if (!books.contains(book)) {

0 commit comments

Comments
 (0)