Package com.Server.entiy
Class User
java.lang.Object
com.Server.entiy.User
@Entity
public class User
extends java.lang.Object
Entity user to store Users data.
- Since:
- 2020-04-27.
- Version:
- 2.0.
- Author:
- Krystian Cwioro Kamil Bieniasz Damian Mierzynski.
-
Field Summary
Fields Modifier and Type Field Description private @NotBlank @Size(max=50) @Email java.lang.Stringemailprivate java.lang.Longidprivate @NotBlank @Size(max=120) java.lang.Stringpasswordprivate java.util.List<Reservation>reservationsprivate java.util.List<Role>rolesprivate @NotBlank @Size(max=20) java.lang.Stringusername -
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleancompareTo(java.lang.Object obj)compatre Object UservoidsetReservations(Reservation reservations)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
id
private java.lang.Long id -
username
@NotBlank @Size(max=20) private @NotBlank @Size(max=20) java.lang.String username -
email
@NotBlank @Size(max=50) @Email private @NotBlank @Size(max=50) @Email java.lang.String email -
password
@NotBlank @Size(max=120) private @NotBlank @Size(max=120) java.lang.String password -
roles
-
reservations
-
-
Constructor Details
-
User
public User(@NotBlank @Size(max=20) @NotBlank @Size(max=20) java.lang.String username, @NotBlank @Size(max=50) @Email @NotBlank @Size(max=50) @Email java.lang.String email, @NotBlank @Size(max=120) @NotBlank @Size(max=120) java.lang.String password, java.util.List<Role> roles)- Parameters:
username- Name of Useremail- Email of Userpassword- Password of Userroles- Role of User
-
-
Method Details
-
setReservations
- Parameters:
reservations- setReservations
-
compareTo
public boolean compareTo(java.lang.Object obj)compatre Object User
-