This class capsulates all direct Peer access for the Group entities.
It allows the exchange of the default Turbine supplied TurbineGroupPeer
class against a custom class.
author: Henning P. Schmiedehausen version: $Id: GroupPeerManager.java 534527 2007-05-02 16:10:59Z tv $
public static Criteria buildCriteria(Group group)(Code)
Calls buildCriteria(Group group) in the configured GroupPeer. If you get
a ClassCastException in this routine, you put a Group 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: group - An object which implements the Group interface A criteria for the supplied group object
Checks if a Group is defined in the system. The name
is used as query criteria.
Parameters: group - The Group to be checked. true if given Group exists in the system. throws: DataBackendException - when more than one Group 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 Group 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 the fully qualified name of the Column to
use as the Name Column for a group
A String containing the column name
getNewGroup
public static Group getNewGroup(Persistent p)(Code)
Returns a new, configured Group Object with
a supplied Persistent object at its core
Parameters: p - The persistent object a new, configured Group Object exception: Exception - Could not create a new Object
Initializes the GroupPeerManager, loading the class object for the
Peer used to retrieve Group objects
Parameters: conf - The configuration object used to configure the Manager exception: InitializationException - A problem occured during initialization
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 Group object
Retrieves/assembles a GroupSet based on the Criteria passed in
Parameters: criteria - A criteria containing a pre-assembled set of criteriasfor the GroupSet A Set of groups which fulfil the required criterias exception: Exception - A generic exception
setGroupName
public static void setGroupName(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
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