Class Profile
- java.lang.Object
-
- edu.cnm.deepdive.albuquirky.model.entity.Profile
-
@Entity public class Profile extends Object
This is theProfileentity class which declares which attributes are needed for each profile which includes,id,username, password, email and OAuth. The profile image and address are both not required. Profile is on the OneToMany side fromCommissionwhich has lists of commission requests and commissions selling. AlsoProducthas a list ofproducts.
-
-
Constructor Summary
Constructors Constructor Description Profile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAddress()Returns theaddressList<Commission>getCommissionsRequested()Gets the commissions requested by theProfile.List<Commission>getCommissionsSelling()Gets theProfilewaitlist.StringgetEmail()Returns theemailLonggetId()Returns theidProfilePicturegetImage()Gets theProfilePicturefor the profile.StringgetOauth()Returns the Profile's OAuth 2.0List<Order>getOrdersBought()Gets a list ofOrderobjects placed by the profile.List<Order>getOrdersSold()Gets a list ofOrderobjects sold by the profile.List<Product>getProducts()Gets a list ofProductobjects sold by the user.StringgetUsername()Returns theusernamevoidsetAddress(String address)Sets theaddressvoidsetEmail(String email)Sets the emailvoidsetImage(ProfilePicture image)Sets theProfilePicturefor the profile.voidsetOauth(String oauth)Sets the OAuth 2.0voidsetUsername(String username)Sets theusername
-
-
-
Method Detail
-
getUsername
@NonNull public String getUsername()
Returns theusername- Returns:
- The username for the profile.
-
setUsername
public void setUsername(@NonNull String username)Sets theusername- Parameters:
username- String
-
setEmail
public void setEmail(@NonNull String email)Sets the email- Parameters:
email- String
-
getImage
public ProfilePicture getImage()
Gets theProfilePicturefor the profile.- Returns:
- The profile picture as a
ProfilePictureobject.
-
setImage
public void setImage(ProfilePicture image)
Sets theProfilePicturefor the profile.- Parameters:
image- The newProfilePicture.
-
getOauth
@NonNull public String getOauth()
Returns the Profile's OAuth 2.0- Returns:
- The OAuth for the profile.
-
setOauth
public void setOauth(@NonNull String oauth)Sets the OAuth 2.0- Parameters:
oauth- - String
-
getOrdersBought
@NonNull public List<Order> getOrdersBought()
Gets a list ofOrderobjects placed by the profile.- Returns:
- List of orders placed.
-
getOrdersSold
@NonNull public List<Order> getOrdersSold()
Gets a list ofOrderobjects sold by the profile.- Returns:
- List of orders sold.
-
getProducts
@NonNull public List<Product> getProducts()
Gets a list ofProductobjects sold by the user.- Returns:
- List of products
-
getCommissionsSelling
@NonNull public List<Commission> getCommissionsSelling()
Gets theProfilewaitlist.- Returns:
- List of commissions selling
-
getCommissionsRequested
@NonNull public List<Commission> getCommissionsRequested()
Gets the commissions requested by theProfile.- Returns:
- List of commissions requested
-
-