You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val subj1:Subject= subjectRepository.save(Subject(0, "Software Engineering", "Apply key aspects of software engineering processes for the development of a complex software system"))
33
-
val subj2:Subject= subjectRepository.save(Subject(0, "Distributed System", "Explore recent advances in distributed computing systems"))
34
-
val subj3:Subject= subjectRepository.save(Subject(0, "Business Analysis and Optimization", "understand the Internal and external factors that impact the business strategy"))
35
-
36
-
val branch1:Branch=Branch(0, "Computer Science and Engineering", "CSE", "CSE department offers courses under ambitious curricula in computer science and computer engineering..")
37
-
branch1.addSubject(subj1)
38
-
branch1.addSubject(subj2)
39
-
branch1.branchData =BranchData("Classic office", 100, "A pretty good office")
40
-
val createdBranch1:Branch= branchRepository.save(branch1)
41
-
logger.info("Created first branch {}", createdBranch1)
42
-
43
-
val branch2:Branch=Branch(0, "Information Technology", "IT", "IT is the business side of computers - usually dealing with databases, business, and accounting")
44
-
branch2.addSubject(subj1)
45
-
branch2.addSubject(subj3)
46
-
val createdBranch2:Branch= branchRepository.save(branch2)
47
-
logger.info("Created second branch {}", createdBranch2)
48
-
49
-
val findById = branchRepository.findById(createdBranch1.branchId)
50
-
logger.info("Found --- first branch {}", findById)
51
-
52
-
logger.info("Deleting first branch {}", createdBranch1)
53
-
branchRepository.delete(createdBranch1)
54
-
logger.info("Searching for first branch {}", branchRepository.existsById(createdBranch1.branchId))
55
-
56
-
logger.info("Deleting second branch {}", createdBranch2)
57
-
branchRepository.delete(createdBranch2)
58
-
logger.info("Searching for second branch {}", branchRepository.existsById(createdBranch2.branchId))
59
-
60
-
logger.info("Checking if branches still presents")
0 commit comments