Class AccountWrapper
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.web.data.wrappers.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 Summary
Constructors Constructor Description AccountWrapper()
AccountWrapper(Account account)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Account
getAccount()
java.lang.String
getEmail()
long
getId()
java.lang.String
getPassword()
java.util.Set<Role>
getRoles()
java.util.Set<Template>
getTemplates()
java.lang.String
getUsername()
java.util.Set<Workspace>
getWorkspaces()
-
-
-
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()
-
-