Class Profile


  • @Entity
    public class Profile
    extends Object
    This is the Profile entity 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 from Commission which has lists of commission requests and commissions selling. Also Product has a list of products.
    • Constructor Detail

      • Profile

        public Profile()
    • Method Detail

      • getId

        public Long getId()
        Returns the id
        Returns:
        The ID for the profile.
      • getUsername

        @NonNull
        public String getUsername()
        Returns the username
        Returns:
        The username for the profile.
      • setUsername

        public void setUsername​(@NonNull
                                String username)
        Sets the username
        Parameters:
        username - String
      • getEmail

        @NonNull
        public String getEmail()
        Returns the email
        Returns:
        The email for the profile.
      • setEmail

        public void setEmail​(@NonNull
                             String email)
        Sets the email
        Parameters:
        email - String
      • getAddress

        public String getAddress()
        Returns the address
        Returns:
        The address for the profile.
      • setAddress

        public void setAddress​(String address)
        Sets the address
        Parameters:
        address - String
      • 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 of Order objects placed by the profile.
        Returns:
        List of orders placed.
      • getOrdersSold

        @NonNull
        public List<Order> getOrdersSold()
        Gets a list of Order objects sold by the profile.
        Returns:
        List of orders sold.
      • getProducts

        @NonNull
        public List<Product> getProducts()
        Gets a list of Product objects sold by the user.
        Returns:
        List of products
      • getCommissionsSelling

        @NonNull
        public List<Commission> getCommissionsSelling()
        Gets the Profile waitlist.
        Returns:
        List of commissions selling
      • getCommissionsRequested

        @NonNull
        public List<Commission> getCommissionsRequested()
        Gets the commissions requested by the Profile.
        Returns:
        List of commissions requested