Class UserEntity

    • Constructor Detail

      • UserEntity

        protected UserEntity()
        Hibernate
      • UserEntity

        protected UserEntity​(java.lang.Long id)
      • UserEntity

        public UserEntity​(java.lang.String username)
        For testing.
        Parameters:
        username - perhaps the email address
      • UserEntity

        public UserEntity​(java.lang.String username,
                          boolean enabled)
        For when logging in reveals a new user.
        Parameters:
        username -
        enabled -
    • Method Detail

      • getId

        public java.lang.Long getId()
        Description copied from class: AbstractUniqueEntity
        Returns the ID of the object. Subclasses need to specify the Column annotation. The ID annotation is necessary: "You cannot override the [id] non-identifier property from the [...AbstractUniqueObject] base class or MappedSuperclass and make it an identifier in the subclass!" So we should not need it in the subclasses.
        Specified by:
        getId in interface UniqueObject<java.lang.Long>
        Specified by:
        getId in interface User
        Overrides:
        getId in class AbstractUniqueEntity<java.lang.Long>
        Returns:
        the unique id of the object.
      • getUsername

        public java.lang.String getUsername()
        The email address is the username
        Specified by:
        getUsername in interface User
        Returns:
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface User
        Returns:
        the enabled
      • setEnabled

        public void setEnabled​(boolean enabled)
        Specified by:
        setEnabled in interface User
        Parameters:
        enabled - the enabled to set
      • setUsername

        public void setUsername​(java.lang.String email)
        Specified by:
        setUsername in interface User