- java.lang.Object
-
- models.Request
-
- models.TransferStudentRequest
-
public class TransferStudentRequest extends Request
TheTransferStudentRequest
class represents a request made to transfer a student from one supervisor to another. It is a subclass of theRequest
class
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
replacementSupervisorID
The ID of the supervisor who will be the new supervisor for the transferred student.
-
Constructor Summary
Constructors Constructor Description TransferStudentRequest(java.lang.String senderID, java.lang.String receiverID, int projectID, int requestID, RequestStatus status, java.util.ArrayList<java.lang.String> history, java.lang.String replacementSupervisorID)
Constructs aTransferStudentRequest
object with the given sender ID, receiver ID, project ID, request ID, request status, history, and replacement supervisorID.TransferStudentRequest(java.lang.String senderID, java.lang.String receiverID, int projectID, java.lang.String replacementSupervisorID)
Constructs aTransferStudentRequest
object with the given sender ID, receiver ID, project ID, and replacement supervisor ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
approve()
Approves theTransferStudentRequest
object.java.lang.String
getReplacementSupervisorID()
Returns the ID of the supervisor who will be the new supervisor for the transferred student.-
Methods inherited from class models.Request
addHistory, getHistory, getProject, getReceiver, getRequestID, getSender, getStatus, getType, reject, setHistory, setStatus, setType
-
-
-
-
Constructor Detail
-
TransferStudentRequest
public TransferStudentRequest(java.lang.String senderID, java.lang.String receiverID, int projectID, int requestID, RequestStatus status, java.util.ArrayList<java.lang.String> history, java.lang.String replacementSupervisorID)
Constructs aTransferStudentRequest
object with the given sender ID, receiver ID, project ID, request ID, request status, history, and replacement supervisorID. This constructor is used for initializing existing requests.- Parameters:
senderID
- the ID of the sender of the requestreceiverID
- the ID of the receiver of the requestprojectID
- the ID of the project associated with the requestrequestID
- the ID of the requeststatus
- the status of the requesthistory
- the history of the requestreplacementSupervisorID
- the ID of the supervisor who will be the new supervisor for the transferred student
-
TransferStudentRequest
public TransferStudentRequest(java.lang.String senderID, java.lang.String receiverID, int projectID, java.lang.String replacementSupervisorID)
Constructs aTransferStudentRequest
object with the given sender ID, receiver ID, project ID, and replacement supervisor ID. This constructor is used for creating new requests.- Parameters:
senderID
- the ID of the sender of the requestreceiverID
- the ID of the receiver of the requestprojectID
- the ID of the project associated with the requestreplacementSupervisorID
- the ID of the supervisor who will be the new supervisor for the transferred student
-
-
Method Detail
-
approve
public boolean approve()
Approves theTransferStudentRequest
object. This method updates the supervisor and project information, and saves the data to the CSV file.
-
getReplacementSupervisorID
public java.lang.String getReplacementSupervisorID()
Returns the ID of the supervisor who will be the new supervisor for the transferred student.- Returns:
- the ID of the replacement supervisor
-
-