This class capsulates all direct Peer access for the Role entities.
It allows the exchange of the default Turbine supplied TurbineRolePeer
class against a custom class
author: Henning P. Schmiedehausen version: $Id: RolePeerManager.java 534527 2007-05-02 16:10:59Z tv $
public static Criteria buildCriteria(Role role)(Code)
Calls buildCriteria(Role role) in the configured RolePeer. If you get
a ClassCastException in this routine, you put a Role object into this
method which can't be cast into an object for the TorqueSecurityService. This is a
configuration error most of the time.
Parameters: role - An object which implements the Role interface A criteria for the supplied role object
Checks if a Role is defined in the system. The name
is used as query criteria.
Parameters: role - The Role to be checked. true if given Role exists in the system. throws: DataBackendException - when more than one Role withthe same name exists. throws: Exception - A generic exception.
doDelete
public static void doDelete(Criteria criteria) throws TorqueException(Code)
Invokes doDelete(Criteria c) on the configured Peer Object
Parameters: criteria - A Criteria Object exception: TorqueException - A problem occured.
doInsert
public static void doInsert(Criteria criteria) throws TorqueException(Code)
Invokes doInsert(Criteria c) on the configured Peer Object
Parameters: criteria - A Criteria Object exception: TorqueException - A problem occured.
doSelect
public static List doSelect(Criteria criteria) throws TorqueException(Code)
Invokes doSelect(Criteria c) on the configured Peer Object
Parameters: criteria - A Criteria Object A List of Role Objects selected by the Criteria exception: TorqueException - A problem occured.
doUpdate
public static void doUpdate(Criteria criteria) throws TorqueException(Code)
Invokes doUpdate(Criteria c) on the configured Peer Object
Parameters: criteria - A Criteria Object exception: TorqueException - A problem occured.
Returns a new, configured Role Object with
a supplied Persistent object at its core
Parameters: p - The persistent object a new, configured Role Object exception: Exception - Could not create a new Object
getRoleName
public static String getRoleName(Persistent obj)(Code)
Invokes getName() on the supplied base object
Parameters: obj - The object to use for getting the name A string containing the name
Initializes the RolePeerManager, loading the class object for the
Peer used to retrieve Role objects
Parameters: conf - The configuration object used to configure the Manager exception: InitializationException - A problem occured duringinitialization
newPersistentInstance
public static Persistent newPersistentInstance()(Code)
Returns a new, empty object for the underlying peer.
Used to create a new underlying object
A new object which is compatible to the Peerand can be used as a User object
Retrieves/assembles a RoleSet based on the Criteria passed in
Parameters: criteria - A criteria containing a pre-assembled set of criteriasfor the RoleSet A Set of roles which fulfil the required criterias exception: Exception - A generic exception.
Retrieves a set of Roles that an User was assigned in a Group
Parameters: user - An user object Parameters: group - A group object A Set of Roles of this User in the Group exception: Exception - A generic exception.
setId
public static void setId(Persistent obj, int id)(Code)
Invokes setId(int n) on the supplied base object
Parameters: obj - The object to use for setting the name Parameters: id - The new Id
setRoleName
public static void setRoleName(Persistent obj, String name)(Code)
Invokes setName(String s) on the supplied base object
Parameters: obj - The object to use for setting the name Parameters: name - The Name to set