net.ezcontent.impl.eos
Class Usuario
java.lang.Object
net.ezcontent.impl.eos.base.BaseUsuario
net.ezcontent.impl.eos.Usuario
- All Implemented Interfaces:
- Serializable, User
- public class Usuario
- extends BaseUsuario
- implements User, Serializable
This is the object class that relates to the Usuario table.
Any customizations belong here.
Implementa User
- See Also:
User
,
Serialized Form
Fields inherited from class net.ezcontent.impl.eos.base.BaseUsuario |
|
Constructor Summary |
Usuario()
|
Usuario(int uid)
Constructor for primary key |
Usuario(int uid,
String username)
Constructor for required fields |
Methods inherited from class net.ezcontent.impl.eos.base.BaseUsuario |
addToGrupos, equals, getFullname, getGrupos, getPassword, getUid, getUsername, hashCode, setFullname, setGrupos, setPassword, setUid, setUsername |
Usuario
public Usuario()
Usuario
public Usuario(int uid)
- Constructor for primary key
Usuario
public Usuario(int uid,
String username)
- Constructor for required fields
setGroups
public void setGroups(List groups)
- Specified by:
setGroups
in interface User
getGroups
public List getGroups()
- Specified by:
getGroups
in interface User
getPermissions
public List getPermissions()
- Devuelve una lista con los permisos que tiene el usuario.
- Specified by:
getPermissions
in interface User
hasPermission
public boolean hasPermission(String permName)
- Determinar si el usuario tiene el permiso con el nombre indicado.
Para ello, recorre todos los grupos a los que pertenece y compara
el permiso contra los permisos de cada grupo. Si el usuario se llama
admin entonces este metodo simplemente devuelve true.
- Specified by:
hasPermission
in interface User
isMemberOfGroup
public boolean isMemberOfGroup(Group g)
- Specified by:
isMemberOfGroup
in interface User
toString
public String toString()