com.atlassian.crowd.embedded.hibernate2
Class HibernateMembershipDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.crowd.embedded.hibernate2.HibernateMembershipDao
All Implemented Interfaces:
com.atlassian.crowd.embedded.spi.MembershipDao, org.springframework.beans.factory.InitializingBean

public final class HibernateMembershipDao
extends org.springframework.orm.hibernate.support.HibernateDaoSupport
implements com.atlassian.crowd.embedded.spi.MembershipDao

Implementation of MembershipDao which uses Hibernate 2.


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
HibernateMembershipDao()
           
 
Method Summary
 com.atlassian.crowd.util.BatchResult<HibernateMembership> addAll(java.util.Set<HibernateMembership> memberships)
           
 com.atlassian.crowd.util.BatchResult<java.lang.String> addAllUsersToGroup(long directoryId, java.util.Collection<java.lang.String> userNames, java.lang.String groupName)
           
 void addGroupToGroup(long directoryId, java.lang.String childGroup, java.lang.String parentGroup)
           
 void addUserToGroup(long directoryId, java.lang.String userName, java.lang.String groupName)
           
 boolean isGroupDirectMember(long directoryId, java.lang.String childGroupName, java.lang.String parentGroupName)
           
 boolean isUserDirectMember(long directoryId, java.lang.String userName, java.lang.String groupName)
           
 void removeGroupFromGroup(long directoryId, java.lang.String childGroupName, java.lang.String parentGroupName)
           
 void removeUserFromGroup(long directoryId, java.lang.String userName, java.lang.String groupName)
           
<T> java.util.List<T>
search(long directoryId, com.atlassian.crowd.search.query.membership.MembershipQuery<T> query)
           
 void setBatchProcessor(com.atlassian.crowd.util.persistence.hibernate.batch.BatchProcessor batchProcessor)
           
 void setGroupDao(InternalGroupDao groupDao)
           
 void setUserDao(InternalUserDao userDao)
           
 
Methods inherited from class org.springframework.orm.hibernate.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

HibernateMembershipDao

public HibernateMembershipDao()
Method Detail

addAllUsersToGroup

public com.atlassian.crowd.util.BatchResult<java.lang.String> addAllUsersToGroup(long directoryId,
                                                                                 java.util.Collection<java.lang.String> userNames,
                                                                                 java.lang.String groupName)
                                                                          throws com.atlassian.crowd.exception.GroupNotFoundException
Specified by:
addAllUsersToGroup in interface com.atlassian.crowd.embedded.spi.MembershipDao
Throws:
com.atlassian.crowd.exception.GroupNotFoundException

isUserDirectMember

public boolean isUserDirectMember(long directoryId,
                                  java.lang.String userName,
                                  java.lang.String groupName)
Specified by:
isUserDirectMember in interface com.atlassian.crowd.embedded.spi.MembershipDao

isGroupDirectMember

public boolean isGroupDirectMember(long directoryId,
                                   java.lang.String childGroupName,
                                   java.lang.String parentGroupName)
Specified by:
isGroupDirectMember in interface com.atlassian.crowd.embedded.spi.MembershipDao

addUserToGroup

public void addUserToGroup(long directoryId,
                           java.lang.String userName,
                           java.lang.String groupName)
                    throws com.atlassian.crowd.exception.UserNotFoundException,
                           com.atlassian.crowd.exception.GroupNotFoundException,
                           com.atlassian.crowd.exception.MembershipAlreadyExistsException
Specified by:
addUserToGroup in interface com.atlassian.crowd.embedded.spi.MembershipDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.MembershipAlreadyExistsException

addGroupToGroup

public void addGroupToGroup(long directoryId,
                            java.lang.String childGroup,
                            java.lang.String parentGroup)
                     throws com.atlassian.crowd.exception.GroupNotFoundException,
                            com.atlassian.crowd.exception.MembershipAlreadyExistsException
Specified by:
addGroupToGroup in interface com.atlassian.crowd.embedded.spi.MembershipDao
Throws:
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.MembershipAlreadyExistsException

removeUserFromGroup

public void removeUserFromGroup(long directoryId,
                                java.lang.String userName,
                                java.lang.String groupName)
                         throws com.atlassian.crowd.exception.UserNotFoundException,
                                com.atlassian.crowd.exception.GroupNotFoundException,
                                com.atlassian.crowd.exception.MembershipNotFoundException
Specified by:
removeUserFromGroup in interface com.atlassian.crowd.embedded.spi.MembershipDao
Throws:
com.atlassian.crowd.exception.UserNotFoundException
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.MembershipNotFoundException

removeGroupFromGroup

public void removeGroupFromGroup(long directoryId,
                                 java.lang.String childGroupName,
                                 java.lang.String parentGroupName)
                          throws com.atlassian.crowd.exception.GroupNotFoundException,
                                 com.atlassian.crowd.exception.MembershipNotFoundException
Specified by:
removeGroupFromGroup in interface com.atlassian.crowd.embedded.spi.MembershipDao
Throws:
com.atlassian.crowd.exception.GroupNotFoundException
com.atlassian.crowd.exception.MembershipNotFoundException

search

public <T> java.util.List<T> search(long directoryId,
                                    com.atlassian.crowd.search.query.membership.MembershipQuery<T> query)
Specified by:
search in interface com.atlassian.crowd.embedded.spi.MembershipDao

addAll

public com.atlassian.crowd.util.BatchResult<HibernateMembership> addAll(java.util.Set<HibernateMembership> memberships)

setUserDao

public void setUserDao(InternalUserDao userDao)

setGroupDao

public void setGroupDao(InternalGroupDao groupDao)

setBatchProcessor

public void setBatchProcessor(com.atlassian.crowd.util.persistence.hibernate.batch.BatchProcessor batchProcessor)


Copyright © 2003-2014 Atlassian. All Rights Reserved.