Class TorqueAbstractBasicGroup
- java.lang.Object
-
- org.apache.fulcrum.security.torque.security.TorqueAbstractSecurityEntity
-
- org.apache.fulcrum.security.torque.basic.TorqueAbstractBasicGroup
-
- All Implemented Interfaces:
Serializable
,Group
,SecurityEntity
,BasicGroup
,org.apache.torque.om.ObjectModel
,org.apache.torque.om.Persistent
- Direct Known Subclasses:
BaseTorqueBasicGroup
public abstract class TorqueAbstractBasicGroup extends TorqueAbstractSecurityEntity implements BasicGroup
This abstract class provides the SecurityInterface to the managers.- Version:
- $Id:$
- Author:
- Thomas Vandahl
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TorqueAbstractBasicGroup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUser(User user)
Add a user to this groupvoid
delete()
Delete this entityString
getDatabaseName()
Get the name of the connection pool associated to this objectprotected List<TorqueBasicUserGroup>
getTorqueBasicUserGroupsJoinTorqueBasicUser(org.apache.torque.criteria.Criteria criteria, Connection con)
Forward reference to generated code Get a list of association objects, pre-populated with their TorqueBasicUser objects.UserSet
getUsers()
Get the users that are part of this group<T extends User>
Set<T>getUsersAsSet()
Get the users that are part of this group as a Setvoid
removeUser(User user)
Remove a user from this groupvoid
retrieveAttachedObjects(Connection con)
old contract, lazy is set tofalse
.void
retrieveAttachedObjects(Connection con, Boolean lazy)
Retrieve attached objects such as users, permissions,....void
setUsers(UserSet userSet)
Set the users that are part of this group<T extends User>
voidsetUsersAsSet(Set<T> users)
Set the users that are part of this group 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
-
-
-
-
Constructor Detail
-
TorqueAbstractBasicGroup
public TorqueAbstractBasicGroup()
-
-
Method Detail
-
getTorqueBasicUserGroupsJoinTorqueBasicUser
protected List<TorqueBasicUserGroup> getTorqueBasicUserGroupsJoinTorqueBasicUser(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 TorqueBasicUser 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
-
addUser
public void addUser(User user)
Description copied from interface:BasicGroup
Add a user to this group- Specified by:
addUser
in interfaceBasicGroup
- Parameters:
user
- the user to add- See Also:
BasicGroup.addUser(org.apache.fulcrum.security.entity.User)
-
getUsers
public UserSet getUsers()
Description copied from interface:BasicGroup
Get the users that are part of this group- Specified by:
getUsers
in interfaceBasicGroup
- Returns:
- a set of users
- See Also:
BasicGroup.getUsers()
-
getUsersAsSet
public <T extends User> Set<T> getUsersAsSet()
Description copied from interface:BasicGroup
Get the users that are part of this group as a Set- Specified by:
getUsersAsSet
in interfaceBasicGroup
- Type Parameters:
T
- User type- Returns:
- a set of users
- See Also:
BasicGroup.getUsersAsSet()
-
removeUser
public void removeUser(User user)
Description copied from interface:BasicGroup
Remove a user from this group- Specified by:
removeUser
in interfaceBasicGroup
- Parameters:
user
- the user to remove- See Also:
BasicGroup.removeUser(org.apache.fulcrum.security.entity.User)
-
setUsers
public void setUsers(UserSet userSet)
Description copied from interface:BasicGroup
Set the users that are part of this group- Specified by:
setUsers
in interfaceBasicGroup
- Parameters:
userSet
- a set of users- See Also:
BasicGroup.setUsers(org.apache.fulcrum.security.util.UserSet)
-
setUsersAsSet
public <T extends User> void setUsersAsSet(Set<T> users)
Description copied from interface:BasicGroup
Set the users that are part of this group as a Set- Specified by:
setUsersAsSet
in interfaceBasicGroup
- Type Parameters:
T
- User type- Parameters:
users
- a set of users- See Also:
BasicGroup.setUsersAsSet(java.util.Set)
-
retrieveAttachedObjects
public void retrieveAttachedObjects(Connection con) throws DataBackendException
Description copied from class:TorqueAbstractSecurityEntity
old contract, lazy is set tofalse
.- 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 connection 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()
-
-