ItEr39S10CUAltaUsuario: Updated entity User to add the attribute 'disabled'

This commit is contained in:
Jacobo Aragunde Pérez 2009-12-18 10:50:37 +01:00 committed by Javier Moran Rua
parent 0ac890a18c
commit e6b8bbbbc8
2 changed files with 11 additions and 0 deletions

View file

@ -51,6 +51,8 @@ public class User extends BaseEntity {
private String email;
private boolean disabled = false;
/**
* Necessary for Hibernate. Please, do not call it.
*/
@ -113,6 +115,14 @@ public class User extends BaseEntity {
profiles.remove(profile);
}
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}
public boolean isDisabled() {
return disabled;
}
@AssertTrue(message="login name is already being used by another user")
public boolean checkConstraintUniqueLoginName() {

View file

@ -22,6 +22,7 @@
<property name="loginName" not-null="true" unique="true"/>
<property name="password" not-null="true"/>
<property name="email"/>
<property name="disabled"/>
<set name="roles" table="USER_ROLES">
<key column="userId"/>
<element>