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 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 interface ObjectDao- Specified by:
getPersistentClass in class HibernateDao
- Returns:
- Class
findByName
public InternalGroup findByName(long directoryID,
java.lang.String groupName)
throws ObjectNotFoundException
- Specified by:
findByName in interface GroupDAO
- Throws:
ObjectNotFoundException
findByNameWithAttributes
public InternalGroupWithAttributes findByNameWithAttributes(long directoryID,
java.lang.String groupName)
throws ObjectNotFoundException
- Specified by:
findByNameWithAttributes in interface GroupDAO
- Throws:
ObjectNotFoundException
findGroupAttributes
public java.util.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,
java.lang.String newName)
throws ObjectNotFoundException
- Specified by:
rename in interface GroupDAO
- Throws:
ObjectNotFoundException
storeAttributes
public void storeAttributes(Group group,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> attributes)
throws ObjectNotFoundException
- Specified by:
storeAttributes in interface GroupDAO
- Throws:
ObjectNotFoundException
removeAttribute
public void removeAttribute(Group group,
java.lang.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 java.util.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,
java.util.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
findByNames
public java.util.Collection<InternalGroup> findByNames(long directoryID,
java.util.Collection<java.lang.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.