com.atlassian.crowd.dao.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.dao.group.GroupDAOHibernate
- All Implemented Interfaces:
- InternalGroupDao, GroupDao, org.springframework.beans.factory.InitializingBean
public class GroupDAOHibernate
- extends HibernateDao
- implements InternalGroupDao, 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 java.lang.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 class HibernateDao
- Returns:
- Class
findByName
public InternalGroup findByName(long directoryId,
java.lang.String groupName)
throws GroupNotFoundException
- Specified by:
findByName
in interface InternalGroupDao
- Specified by:
findByName
in interface GroupDao
- Throws:
GroupNotFoundException
findByNameWithAttributes
public InternalGroupWithAttributes findByNameWithAttributes(long directoryId,
java.lang.String groupName)
throws GroupNotFoundException
- Specified by:
findByNameWithAttributes
in interface GroupDao
- Throws:
GroupNotFoundException
findGroupAttributes
public java.util.Set<InternalGroupAttribute> findGroupAttributes(long groupId)
- Specified by:
findGroupAttributes
in interface InternalGroupDao
add
public InternalGroup add(Group group)
throws GroupNotFoundException
- Specified by:
add
in interface GroupDao
- Throws:
GroupNotFoundException
addLocal
public InternalGroup addLocal(Group group)
throws GroupNotFoundException
- Specified by:
addLocal
in interface GroupDao
- Throws:
GroupNotFoundException
update
public InternalGroup update(Group group)
throws GroupNotFoundException
- Specified by:
update
in interface GroupDao
- Throws:
GroupNotFoundException
rename
public InternalGroup rename(Group group,
java.lang.String newName)
throws GroupNotFoundException
- Specified by:
rename
in interface GroupDao
- Throws:
GroupNotFoundException
storeAttributes
public void storeAttributes(Group group,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> attributes)
throws GroupNotFoundException
- Specified by:
storeAttributes
in interface GroupDao
- Throws:
GroupNotFoundException
removeAttribute
public void removeAttribute(Group group,
java.lang.String attributeName)
throws GroupNotFoundException
- Specified by:
removeAttribute
in interface GroupDao
- Throws:
GroupNotFoundException
remove
public void remove(Group group)
throws GroupNotFoundException
- Specified by:
remove
in interface GroupDao
- Throws:
GroupNotFoundException
removeAllGroups
public void removeAllGroups(long directoryId,
java.util.Set<java.lang.String> groupNames)
throws GroupNotFoundException
- Specified by:
removeAllGroups
in interface GroupDao
- Throws:
GroupNotFoundException
removeAll
public void removeAll(long directoryId)
- Specified by:
removeAll
in interface InternalGroupDao
search
public <T> java.util.List<T> search(long directoryId,
EntityQuery<T> query)
- Specified by:
search
in interface GroupDao
addAll
public BatchResult<Group> addAll(java.util.Set<? extends Group> groups)
throws DirectoryNotFoundException
- Description copied from interface:
GroupDao
- Bulk add of groups. Will only add remote groups (ie. isLocal=false)
- Specified by:
addAll
in interface GroupDao
- Parameters:
groups
- to be added
- Returns:
- a list of Groups that failed to be added
- Throws:
DirectoryNotFoundException
- if the directory cannot be found
addAll
public BatchResultWithIdReferences<Group> addAll(java.util.Collection<InternalGroupWithAttributes> groups)
- Specified by:
addAll
in interface InternalGroupDao
findByNames
public java.util.Collection<InternalGroup> findByNames(long directoryID,
java.util.Collection<java.lang.String> groupnames)
- Description copied from interface:
InternalGroupDao
- Bulk find of groups using SQL disjunction.
- Specified by:
findByNames
in interface InternalGroupDao
- Parameters:
directoryID
- the directory to search for the groups.groupnames
- names of groups to find
- Returns:
- collection of found groups.
setDirectoryDao
public void setDirectoryDao(DirectoryDAOHibernate directoryDao)
setMembershipDAO
public void setMembershipDAO(InternalMembershipDao internalMembershipDao)
setHqlQueryTranslater
public void setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater)
setInternalAttributesHelper
public void setInternalAttributesHelper(InternalAttributesHelper internalAttributesHelper)
Copyright © 2010 Atlassian. All Rights Reserved.