My Demonstration for my features

Links: Sign Up Class Creation Feature

My checklist:

  • Backend: New Attributes for the Person Class (5/23)
    @ElementCollection(fetch = FetchType.EAGER)
      @CollectionTable(name = "person_subjects", joinColumns = @JoinColumn(name = "person_id"))
      @Column(name = "subject")
      private Collection<String> subjectsOfInterest = new ArrayList<>();
    
  • Frontend: Sign Up Page (5/25)
  • Backend: Connect the new users generated after they sign up to the database (5/26)
    @PostMapping("/post")
      public ResponseEntity<Object> postPerson(@RequestBody PersonRequest personRequest) {
          // A person object WITHOUT ID will create a new record with default roles as
          // student
          Person person = new Person(personRequest.getEmail(), personRequest.getPassword(), personRequest.getName(),
                  personRequest.getUsn(), personRequest.getSubjectsOfInterest());
          personDetailsService.save(person);
          return new ResponseEntity<>(personRequest.getEmail() + " is created successfully", HttpStatus.CREATED);
      }
    
  • Backend: Implement searching into the class creation feature based on subjects. (5/27) Uses a SQL query to get the subjects of interest ```java // List findBySubjectsOfInterestContainingIgnoreCase(String subjectOfInterest); // CUSTOM QUERY METHOD TO GET A SUBJECT OF INTEREST @Query("SELECT p FROM Person p JOIN p.subjectsOfInterest s WHERE LOWER(s) = LOWER(:subjectOfInterest)") List findBySubjectOfInterestIgnoreCase(@Param("subjectOfInterest") String subjectOfInterest);

@GetMapping(“/getBySubject/{subjectOfInterest}”) public ResponseEntity<?> getPersonsBySubject(@PathVariable String subjectOfInterest) { List personList = personDetailsService.getPersonsBySubjectOfInterest(subjectOfInterest); // regardless of outcome, even if it's an empty list, it's still a valid output return new ResponseEntity<>(personList, HttpStatus.OK); } ```

Undo and Redo Stacks and Queues:

image image

  • I tried to use backend for this method, but it didn’t work out well so I have frontend