Class TorqueAbstractBasicUser
- java.lang.Object
-
- org.apache.fulcrum.security.torque.security.TorqueAbstractSecurityEntity
-
- org.apache.fulcrum.security.torque.basic.TorqueAbstractBasicUser
-
- All Implemented Interfaces:
Serializable
,SecurityEntity
,User
,BasicUser
,org.apache.torque.om.ObjectModel
,org.apache.torque.om.Persistent
- Direct Known Subclasses:
BaseTorqueBasicUser
public abstract class TorqueAbstractBasicUser extends TorqueAbstractSecurityEntity implements BasicUser
This abstract class provides the SecurityInterface to the managers.- Version:
- $Id:$
- Author:
- Thomas Vandahl
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TorqueAbstractBasicUser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGroup(Group group)
Add the group to the list of groupsvoid
delete()
Delete this entityString
getDatabaseName()
Get the name of the connnection pool associated to this objectGroupSet
getGroups()
Get the groups this user is part of<T extends Group>
Set<T>getGroupsAsSet()
Get the groups this user is part of as a Setprotected List<TorqueBasicUserGroup>
getTorqueBasicUserGroupsJoinTorqueBasicGroup(org.apache.torque.criteria.Criteria criteria, Connection con)
Forward reference to generated code Get a list of association objects, pre-populated with their TorqueBasicGroup objects.void
removeGroup(Group group)
Remove the group from the list of groupsvoid
retrieveAttachedObjects(Connection con)
Retrieve attached objects such as users, permissions,....void
retrieveAttachedObjects(Connection con, Boolean lazy)
Retrieve attached objects such as users, permissions,....void
setGroups(GroupSet groups)
Set the groups this user is part of<T extends Group>
voidsetGroupsAsSet(Set<T> groups)
Set the groups this user is part of as a Setvoid
update(Connection con)
Update this instance to the database with all dependent objects-
Methods inherited from class org.apache.fulcrum.security.torque.security.TorqueAbstractSecurityEntity
getEntityId, getEntityName, getId, getName, setEntityId, setEntityName, setId, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.torque.om.ObjectModel
getPrimaryKey, isModified, isNew, setModified, setNew, setPrimaryKey, setPrimaryKey
-
Methods inherited from interface org.apache.fulcrum.security.entity.SecurityEntity
getId, getName, setId, setName
-
Methods inherited from interface org.apache.fulcrum.security.entity.User
getPassword, setPassword
-
-
-
-
Constructor Detail
-
TorqueAbstractBasicUser
public TorqueAbstractBasicUser()
-
-
Method Detail
-
getTorqueBasicUserGroupsJoinTorqueBasicGroup
protected List<TorqueBasicUserGroup> getTorqueBasicUserGroupsJoinTorqueBasicGroup(org.apache.torque.criteria.Criteria criteria, Connection con) throws org.apache.torque.TorqueException
Forward reference to generated code Get a list of association objects, pre-populated with their TorqueBasicGroup objects.- Parameters:
criteria
- Criteria to define the selection of recordscon
- a database connection- Returns:
- a list of User/Group relations
- Throws:
org.apache.torque.TorqueException
- if any database error occurs
-
addGroup
public void addGroup(Group group)
Description copied from interface:BasicUser
Add the group to the list of groups- Specified by:
addGroup
in interfaceBasicUser
- Parameters:
group
- the group to add- See Also:
BasicUser.addGroup(org.apache.fulcrum.security.entity.Group)
-
getGroups
public GroupSet getGroups()
Description copied from interface:BasicUser
Get the groups this user is part of- Specified by:
getGroups
in interfaceBasicUser
- Returns:
- a set of groups
- See Also:
BasicUser.getGroups()
-
getGroupsAsSet
public <T extends Group> Set<T> getGroupsAsSet()
Description copied from interface:BasicUser
Get the groups this user is part of as a Set- Specified by:
getGroupsAsSet
in interfaceBasicUser
- Returns:
- a set of groups
- See Also:
BasicUser.getGroupsAsSet()
-
removeGroup
public void removeGroup(Group group)
Description copied from interface:BasicUser
Remove the group from the list of groups- Specified by:
removeGroup
in interfaceBasicUser
- Parameters:
group
- the group to remove- See Also:
BasicUser.removeGroup(org.apache.fulcrum.security.entity.Group)
-
setGroups
public void setGroups(GroupSet groups)
Description copied from interface:BasicUser
Set the groups this user is part of- Specified by:
setGroups
in interfaceBasicUser
- Parameters:
groups
- the set of groups- See Also:
BasicUser.setGroups(org.apache.fulcrum.security.util.GroupSet)
-
setGroupsAsSet
public <T extends Group> void setGroupsAsSet(Set<T> groups)
Description copied from interface:BasicUser
Set the groups this user is part of as a Set- Specified by:
setGroupsAsSet
in interfaceBasicUser
- Parameters:
groups
- the set of groups- See Also:
BasicUser.setGroupsAsSet(java.util.Set)
-
retrieveAttachedObjects
public void retrieveAttachedObjects(Connection con) throws DataBackendException
Retrieve attached objects such as users, permissions,....- Specified by:
retrieveAttachedObjects
in classTorqueAbstractSecurityEntity
- Parameters:
con
- A database connection- Throws:
DataBackendException
- wrapper exception: user information not found exception
-
retrieveAttachedObjects
public void retrieveAttachedObjects(Connection con, Boolean lazy) throws DataBackendException
Retrieve attached objects such as users, permissions,....- Specified by:
retrieveAttachedObjects
in classTorqueAbstractSecurityEntity
- Parameters:
con
- A database connectionlazy
- iftrue
, may load some or all relationships later- Throws:
DataBackendException
-
update
public void update(Connection con) throws org.apache.torque.TorqueException
Update this instance to the database with all dependent objects- Specified by:
update
in classTorqueAbstractSecurityEntity
- Parameters:
con
- A database connection- Throws:
org.apache.torque.TorqueException
- database not found exception
-
getDatabaseName
public String getDatabaseName()
Get the name of the connnection pool associated to this object- Returns:
- the logical Torque database name
-
delete
public void delete() throws org.apache.torque.TorqueException
Description copied from class:TorqueAbstractSecurityEntity
Delete this entity- Specified by:
delete
in classTorqueAbstractSecurityEntity
- Throws:
org.apache.torque.TorqueException
- if any database error occurs if any database operation fails- See Also:
TorqueAbstractSecurityEntity.delete()
-
-