com.atlassian.crowd.model.group
Class GroupDAOHibernate
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
com.atlassian.crowd.util.persistence.hibernate.HibernateDao
com.atlassian.crowd.model.group.GroupDAOHibernate
- All Implemented Interfaces:
- GroupDAO, ObjectDao, org.springframework.beans.factory.InitializingBean
public class GroupDAOHibernate
- extends HibernateDao
- implements GroupDAO
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 |
GroupDAOHibernate
public GroupDAOHibernate()
getPersistentClass
public Class getPersistentClass()
- Description copied from class:
HibernateDao
- All subclasses of HibernateDAO must implement this method for
HibernateDao.load(long)
to
work correctly
- Specified by:
getPersistentClass
in interface ObjectDao
- Specified by:
getPersistentClass
in class HibernateDao
- Returns:
- Class
findByName
public InternalGroup findByName(long directoryID,
String groupName)
throws ObjectNotFoundException
- Specified by:
findByName
in interface GroupDAO
- Throws:
ObjectNotFoundException
findByNameWithAttributes
public InternalGroupWithAttributes findByNameWithAttributes(long directoryID,
String groupName)
throws ObjectNotFoundException
- Specified by:
findByNameWithAttributes
in interface GroupDAO
- Throws:
ObjectNotFoundException
findGroupAttributes
public List<InternalGroupAttribute> findGroupAttributes(long groupId)
add
public InternalGroup add(Group group)
throws ObjectNotFoundException
- Specified by:
add
in interface GroupDAO
- Throws:
ObjectNotFoundException
update
public InternalGroup update(Group group)
throws ObjectNotFoundException
- Specified by:
update
in interface GroupDAO
- Throws:
ObjectNotFoundException
rename
public InternalGroup rename(Group group,
String newName)
throws ObjectNotFoundException
- Specified by:
rename
in interface GroupDAO
- Throws:
ObjectNotFoundException
storeAttributes
public void storeAttributes(Group group,
Map<String,List<String>> attributes)
throws ObjectNotFoundException
- Specified by:
storeAttributes
in interface GroupDAO
- Throws:
ObjectNotFoundException
removeAttribute
public void removeAttribute(Group group,
String attributeName)
throws ObjectNotFoundException
- Specified by:
removeAttribute
in interface GroupDAO
- Throws:
ObjectNotFoundException
remove
public void remove(Group group)
throws ObjectNotFoundException
- Specified by:
remove
in interface GroupDAO
- Throws:
ObjectNotFoundException
removeAll
public void removeAll(long directoryId)
- Specified by:
removeAll
in interface GroupDAO
search
public List search(long directoryID,
EntityQuery query)
- Specified by:
search
in interface GroupDAO
- Parameters:
directoryID
- ID of the directory to condunct the search.query
- the group query
- Returns:
- a List of groups, or an empty list.
addAll
public BatchResult<Group> addAll(long directoryId,
Set<GroupTemplate> groups)
throws ObjectNotFoundException
- Description copied from interface:
GroupDAO
- Bulk add of users using JDBC batch support.
- Specified by:
addAll
in interface GroupDAO
- Parameters:
directoryId
- the directory to add the groups togroups
- to be added
- Returns:
- a list of Groups that failed to be added
- Throws:
ObjectNotFoundException
- if the directory cannot be found
addAll
public BatchResultWithIdReferences<Group> addAll(Collection<InternalGroupWithAttributes> groups)
findByNames
public Collection<InternalGroup> findByNames(long directoryID,
Collection<String> groupnames)
- Description copied from interface:
GroupDAO
- Bulk find of groups using SQL disjunction.
- Specified by:
findByNames
in interface GroupDAO
- Parameters:
directoryID
- the directory to search for the groups.groupnames
- names of groups to find
- Returns:
- collection of found groups.
setDirectoryDAO
public void setDirectoryDAO(DirectoryDAO directoryDAO)
setMembershipDAO
public void setMembershipDAO(MembershipDAO membershipDAO)
setHqlQueryTranslater
public void setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater)
setInternalAttributesHelper
public void setInternalAttributesHelper(InternalAttributesHelper internalAttributesHelper)
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.