Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup. #440

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public Page<ConstraintSignature> getConstraintSignatures(Pageable pageable,

/**
* Maps the HTTP GET request for a constraint signature with the given ID to the
* {@link ConstraintSignatureService#getById(String)} getById} function of the
* {@link ConstraintSignatureService#getById(String) getById} function of the
* constraint signature service.
*
* @param signatureId the ID of the signature.
Expand Down Expand Up @@ -91,7 +91,7 @@ public ConstraintInstance createConstraintInstance(@PathVariable String signatur

/**
* Maps the HTTP GET request for a constraint signature with the given ID to the
* {@link ConstraintSignatureService#getById(String)} getById} function of
* {@link ConstraintSignatureService#getById(String)} getById function of
* the constraint signature service.
*
* @param signatureId the constraint signature for which an instance is to be created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public Student updateStudent(@PathVariable String id, @RequestBody StudentReques
}

/**
* Maps the HTTP GET request, to get the lessons that the student atttends to the
* Maps the HTTP GET request, to get the lessons that the student attends to the
* {@link StudentService#getLessonsById(String) get LessonsById}
* function of the student service.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public Subject updateSubject(@PathVariable String id, @RequestBody SubjectReques
}

/**
* Maps the HTTP DELETE request to the {@link SubjectService#delete(String) delete} function
* Maps the HTTP DELETE request to the {@link SubjectService#deleteSubjects(String[])} delete function
* of the subject service.
*
* @param ids the ID sof the subject which are to be deleted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public record CurriculumResponseDto(@NotEmpty String id, @NotEmpty String name,
*
* @param curriculum the Curriculum whose information should be included
* in the CurriculumResponseDto.
* @return the CurriculumResponseDto containing information about the Curriculum.
*/
public CurriculumResponseDto(Curriculum curriculum) {
this(curriculum.getId(), curriculum.getName(),
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/de/uftos/entities/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class Server {
*
* @param timetableMetadata the timetable metadata, including information like start of the day.
* @param currentYear the current year.
* @param email the email address notifications should be send to.
* @param email the email address notifications should be sent to.
*/
public Server(TimetableMetadata timetableMetadata, String currentYear, String email) {
this.timetableMetadata = timetableMetadata;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface ConstraintInstanceRepository
LEFT OUTER JOIN subjects su
ON su.id=args.value
WHERE
te.first_name ILIKE cast(:arg as varchar) || '%' OR te.last_name ILIKE cast(:arg as varchar) || '%'
te.first_name ILIKE cast(:arg as varchar) || '%' OR te.last_name ILIKE cast(:arg as varchar) || '%'
OR te.acronym ILIKE cast(:arg as varchar) || '%'
OR st.first_name ILIKE cast(:arg as varchar) || '%' OR st.last_name ILIKE cast(:arg as varchar) || '%'
OR st_g.name ILIKE cast(:arg as varchar) || '%'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.uftos.repositories.database;

import de.uftos.entities.Grade;
import de.uftos.entities.Student;
import de.uftos.entities.StudentGroup;
import de.uftos.entities.Subject;
Expand Down Expand Up @@ -28,8 +27,6 @@ public interface StudentGroupRepository

List<StudentGroup> findBySubjects(Subject subject);

List<StudentGroup> findByGrades(Grade grade);

@Query("SELECT sg FROM student_groups sg LEFT JOIN sg.grades g WHERE g.id IN :gradeIds")
List<StudentGroup> findAllByGrades(List<String> gradeIds);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import org.springframework.stereotype.Repository;

/**
* This class represents a implementation of the SolverRepository interface utilizing the Timefold solver.
* This class represents an implementation of the SolverRepository interface utilizing the Timefold solver.
*/
@Repository
public class SolverRepositoryImpl implements SolverRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
/**
* This class models a number that can be used by the Timefold solver.
*/
@Getter
public class NumberTimefoldInstance implements ResourceTimefoldInstance {
@Getter
private final int value;

public NumberTimefoldInstance(int value) {
Expand All @@ -31,7 +31,7 @@ public boolean equals(Object o) {
}
return n.value == this.value;
}

@Override
public int hashCode() {
return this.value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public Timeslot getById(String id) {
Optional<Timeslot> timeslot = this.repository.findById(id);

return timeslot.orElseThrow(() -> new ResponseStatusException(HttpStatus.BAD_REQUEST,
"Could not find a timesot with this id"));
"Could not find a timeslot with this id"));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.ExecutionException;
import java.util.function.Consumer;
import org.apache.coyote.BadRequestException;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down