org.wamblee.usermgt.hibernate
Class HibernateGroupSet

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by org.wamblee.persistence.hibernate.HibernateSupport
              extended by org.wamblee.usermgt.hibernate.HibernateGroupSet
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, GroupSet

public class HibernateGroupSet
extends HibernateSupport
implements GroupSet

Set of groups backed by the database.

Author:
Erik Brakkee

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
HibernateGroupSet()
           
 
Method Summary
 boolean add(Group aGroup)
          Adds a group.
 boolean contains(Group aGroup)
          Determines if the group exists.
 Group find(java.lang.String aName)
          Finds the group by name.
 void groupModified(Group aGroup)
          Must be called when the group has been modified to notify the group set.
 java.util.Set<Group> list()
          Returns the current groups.
 boolean remove(Group aGroup)
          Removes a group.
 int size()
           
 
Methods inherited from class org.wamblee.persistence.hibernate.HibernateSupport
merge, merge, processList, processMap, processPersistent, processSet
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateGroupSet

public HibernateGroupSet()
Method Detail

groupModified

public void groupModified(Group aGroup)
Description copied from interface: GroupSet
Must be called when the group has been modified to notify the group set.

Specified by:
groupModified in interface GroupSet
Parameters:
aGroup - Group that was modified.

find

public Group find(java.lang.String aName)
Description copied from interface: GroupSet
Finds the group by name.

Specified by:
find in interface GroupSet
Parameters:
aName - Group name.
Returns:
Group or null if not found.

contains

public boolean contains(Group aGroup)
Description copied from interface: GroupSet
Determines if the group exists.

Specified by:
contains in interface GroupSet
Parameters:
aGroup - Group.
Returns:
True iff the group exists.

add

public boolean add(Group aGroup)
Description copied from interface: GroupSet
Adds a group. If the group already exists, the existing group set is left unchanged.

Specified by:
add in interface GroupSet
Parameters:
aGroup - Group.

remove

public boolean remove(Group aGroup)
Description copied from interface: GroupSet
Removes a group. If the group does not exist, this method is a no-op.

Specified by:
remove in interface GroupSet
Parameters:
aGroup - Group to remove.
Returns:
True if the group was removed, false otherwise.

list

public java.util.Set<Group> list()
Description copied from interface: GroupSet
Returns the current groups.

Specified by:
list in interface GroupSet
Returns:
Groups.

size

public int size()
Specified by:
size in interface GroupSet
Returns:
The number of groups.


Copyright © 2010. All Rights Reserved.