in torque/src/java/org/apache/fulcrum/security/torque/TorqueAbstractRoleManager.java [247:282]
public RoleSet getAllRoles() throws DataBackendException
{
RoleSet roleSet = new RoleSet();
Connection con = null;
try
{
con = Transaction.begin();
List<Role> roles = doSelectAllRoles(con);
for (Role role : roles)
{
// Add attached objects if they exist
((TorqueAbstractSecurityEntity)role).retrieveAttachedObjects(con, getLazyLoading());
roleSet.add(role);
}
Transaction.commit(con);
con = null;
}
catch (TorqueException e)
{
throw new DataBackendException("Error retrieving role information", e);
}
finally
{
if (con != null)
{
Transaction.safeRollback(con);
}
}
return roleSet;
}