Class AccountWrapper


  • public class AccountWrapper
    extends java.lang.Object
    Somehow if you use form binding to set a variable with the same name as a variable in the Account object, the variable in the ModelAttribute("account") instance of the Account object is overwritten. e.g. if you have a form with a variable called "email", the email variable in ModelAttribute("account") is being overwritten with the result of the form binding. Therefore, ModelAttribute("account") now returns AccountWrapper instead of Account to prevent variables being overwritten. All get functions in this wrapper must match those in the Account object.
    • Constructor Detail

      • AccountWrapper

        public AccountWrapper()
      • AccountWrapper

        public AccountWrapper​(Account account)
    • Method Detail

      • getId

        public long getId()
      • getEmail

        public java.lang.String getEmail()
      • getPassword

        public java.lang.String getPassword()
      • getRoles

        public java.util.Set<Role> getRoles()
      • getUsername

        public java.lang.String getUsername()
      • getWorkspaces

        public java.util.Set<Workspace> getWorkspaces()
      • getTemplates

        public java.util.Set<Template> getTemplates()
      • getAccount

        public Account getAccount()