StudentLoanManagement
com.student_loan.model.User Class Reference

Classes

enum  DegreeType
 

Public Member Functions

 User ()
 
 User (Long id, String name, String email, String password, String telephoneNumber, String address, DegreeType degreeType, Integer degreeYear, Integer penalties, Double averageRating, Boolean admin)
 
Long getId ()
 
void setId (Long id)
 
String getName ()
 
void setName (String name)
 
String getEmail ()
 
void setEmail (String email)
 
String getPassword ()
 
void setPassword (String password)
 
String getTelephoneNumber ()
 
void setTelephoneNumber (String telephoneNumber)
 
String getAddress ()
 
void setAddress (String address)
 
DegreeType getDegreeType ()
 
void setDegreeType (DegreeType degreeType)
 
Integer getDegreeYear ()
 
void setDegreeYear (Integer degreeYear)
 
Integer getPenalties ()
 
void setPenalties (Integer penalties)
 
Double getAverageRating ()
 
void setAverageRating (Double averageRating)
 
Boolean getAdmin ()
 
void setAdmin (Boolean admin)
 
String toString ()
 
boolean hasPenalty ()
 

Detailed Description

Entity class representing a user in the system. Maps to the "users" table in the database.

Definition at line 11 of file User.java.

Constructor & Destructor Documentation

◆ User() [1/2]

com.student_loan.model.User.User ( )

Default constructor for the User class.

Definition at line 87 of file User.java.

◆ User() [2/2]

com.student_loan.model.User.User ( Long  id,
String  name,
String  email,
String  password,
String  telephoneNumber,
String  address,
DegreeType  degreeType,
Integer  degreeYear,
Integer  penalties,
Double  averageRating,
Boolean  admin 
)

Constructor for the User class.

Parameters
idThe unique identifier for the user.
nameThe name of the user.
emailThe email of the user.
passwordThe password of the user.
telephoneNumberThe telephone number of the user.
addressThe address of the user.
degreeTypeThe degree type of the user.
degreeYearThe year of the degree the user is pursuing or has completed.
penaltiesThe number of penalties the user has accumulated.
averageRatingThe average rating of the user.
adminIndicates whether the user has admin privileges.

Definition at line 105 of file User.java.

Member Function Documentation

◆ getAddress()

String com.student_loan.model.User.getAddress ( )

Gets the address of the user.

Returns
The address of the user.

Definition at line 216 of file User.java.

◆ getAdmin()

Boolean com.student_loan.model.User.getAdmin ( )

Gets whether the user has admin privileges.

Returns
True if the user has admin privileges, false otherwise.

Definition at line 306 of file User.java.

◆ getAverageRating()

Double com.student_loan.model.User.getAverageRating ( )

Gets the average rating of the user.

Returns
The average rating of the user.

Definition at line 288 of file User.java.

◆ getDegreeType()

DegreeType com.student_loan.model.User.getDegreeType ( )

Gets the degree type of the user.

Returns
The degree type of the user.

Definition at line 234 of file User.java.

◆ getDegreeYear()

Integer com.student_loan.model.User.getDegreeYear ( )

Gets the year of the degree the user is pursuing or has completed.

Returns
The year of the degree the user is pursuing or has completed.

Definition at line 252 of file User.java.

◆ getEmail()

String com.student_loan.model.User.getEmail ( )

Gets the email of the user.

Returns
The email of the user.

Definition at line 162 of file User.java.

◆ getId()

Long com.student_loan.model.User.getId ( )

Gets the unique identifier for the user.

Returns
The unique identifier for the user.

Definition at line 126 of file User.java.

◆ getName()

String com.student_loan.model.User.getName ( )

Gets the name of the user.

Returns
The name of the user.

Definition at line 144 of file User.java.

◆ getPassword()

String com.student_loan.model.User.getPassword ( )

Gets the password of the user.

Returns
The password of the user.

Definition at line 180 of file User.java.

◆ getPenalties()

Integer com.student_loan.model.User.getPenalties ( )

Gets the number of penalties the user has accumulated.

Returns
The number of penalties the user has accumulated.

Definition at line 270 of file User.java.

◆ getTelephoneNumber()

String com.student_loan.model.User.getTelephoneNumber ( )

Gets the telephone number of the user.

Returns
The telephone number of the user.

Definition at line 198 of file User.java.

◆ hasPenalty()

boolean com.student_loan.model.User.hasPenalty ( )

Definition at line 341 of file User.java.

◆ setAddress()

void com.student_loan.model.User.setAddress ( String  address)

Sets the address of the user.

Parameters
addressThe address of the user.

Definition at line 225 of file User.java.

◆ setAdmin()

void com.student_loan.model.User.setAdmin ( Boolean  admin)

Sets whether the user has admin privileges.

Parameters
adminTrue if the user has admin privileges, false otherwise.

Definition at line 315 of file User.java.

◆ setAverageRating()

void com.student_loan.model.User.setAverageRating ( Double  averageRating)

Sets the average rating of the user.

Parameters
averageRatingThe average rating of the user.

Definition at line 297 of file User.java.

◆ setDegreeType()

void com.student_loan.model.User.setDegreeType ( DegreeType  degreeType)

Sets the degree type of the user.

Parameters
degreeTypeThe degree type of the user.

Definition at line 243 of file User.java.

◆ setDegreeYear()

void com.student_loan.model.User.setDegreeYear ( Integer  degreeYear)

Sets the year of the degree the user is pursuing or has completed.

Parameters
degreeYearThe year of the degree the user is pursuing or has completed.

Definition at line 261 of file User.java.

◆ setEmail()

void com.student_loan.model.User.setEmail ( String  email)

Sets the email of the user.

Parameters
emailThe email of the user.

Definition at line 171 of file User.java.

◆ setId()

void com.student_loan.model.User.setId ( Long  id)

Sets the unique identifier for the user.

Parameters
idThe unique identifier for the user.

Definition at line 135 of file User.java.

◆ setName()

void com.student_loan.model.User.setName ( String  name)

Sets the name of the user.

Parameters
nameThe name of the user.

Definition at line 153 of file User.java.

◆ setPassword()

void com.student_loan.model.User.setPassword ( String  password)

Sets the password of the user.

Parameters
passwordThe password of the user.

Definition at line 189 of file User.java.

◆ setPenalties()

void com.student_loan.model.User.setPenalties ( Integer  penalties)

Sets the number of penalties the user has accumulated.

Parameters
penaltiesThe number of penalties the user has accumulated.

Definition at line 279 of file User.java.

◆ setTelephoneNumber()

void com.student_loan.model.User.setTelephoneNumber ( String  telephoneNumber)

Sets the telephone number of the user.

Parameters
telephoneNumberThe telephone number of the user.

Definition at line 207 of file User.java.

◆ toString()

String com.student_loan.model.User.toString ( )

Returns a string representation of the user.

Returns
A string representation of the user.

Definition at line 325 of file User.java.


The documentation for this class was generated from the following file: