com.atlassian.crowd.model.group
Interface GroupDAO

All Superinterfaces:
ObjectDao
All Known Implementing Classes:
GroupDAOHibernate

public interface GroupDAO
extends ObjectDao

Persistance methods necessary to modify an InternalDirectory group.


Method Summary
 InternalGroup add(Group group)
           
 BatchResult<Group> addAll(long directoryId, Set<GroupTemplate> groups)
          Bulk add of users using JDBC batch support.
 InternalGroup findByName(long directoryId, String groupName)
           
 Collection<InternalGroup> findByNames(long directoryId, Collection<String> groupnames)
          Bulk find of groups using SQL disjunction.
 InternalGroupWithAttributes findByNameWithAttributes(long directoryID, String groupName)
           
 void remove(Group group)
           
 void removeAll(long directoryId)
           
 void removeAttribute(Group group, String attributeName)
           
 InternalGroup rename(Group group, String newName)
           
 List search(long directoryID, EntityQuery query)
           
 void storeAttributes(Group group, Map<String,List<String>> attributes)
           
 InternalGroup update(Group group)
           
 
Methods inherited from interface com.atlassian.crowd.util.persistence.hibernate.ObjectDao
getPersistentClass, load, remove, save, update
 

Method Detail

findByName

InternalGroup findByName(long directoryId,
                         String groupName)
                         throws ObjectNotFoundException
Throws:
ObjectNotFoundException

findByNameWithAttributes

InternalGroupWithAttributes findByNameWithAttributes(long directoryID,
                                                     String groupName)
                                                     throws ObjectNotFoundException
Throws:
ObjectNotFoundException

add

InternalGroup add(Group group)
                  throws ObjectNotFoundException
Throws:
ObjectNotFoundException

update

InternalGroup update(Group group)
                     throws ObjectNotFoundException
Throws:
ObjectNotFoundException

rename

InternalGroup rename(Group group,
                     String newName)
                     throws ObjectNotFoundException
Throws:
ObjectNotFoundException

storeAttributes

void storeAttributes(Group group,
                     Map<String,List<String>> attributes)
                     throws ObjectNotFoundException
Throws:
ObjectNotFoundException

removeAttribute

void removeAttribute(Group group,
                     String attributeName)
                     throws ObjectNotFoundException
Throws:
ObjectNotFoundException

remove

void remove(Group group)
            throws ObjectNotFoundException
Throws:
ObjectNotFoundException

removeAll

void removeAll(long directoryId)

search

List search(long directoryID,
            EntityQuery query)
Parameters:
directoryID - ID of the directory to condunct the search.
query - the group query
Returns:
a List of groups, or an empty list.
Throws:
org.springframework.dao.DataAccessException - underlying problem communicating with the database.
IllegalArgumentException - query contains illegal arguments.

addAll

BatchResult<Group> addAll(long directoryId,
                          Set<GroupTemplate> groups)
                          throws ObjectNotFoundException
Bulk add of users using JDBC batch support.

Parameters:
directoryId - the directory to add the groups to
groups - to be added
Returns:
a list of Groups that failed to be added
Throws:
ObjectNotFoundException - if the directory cannot be found

findByNames

Collection<InternalGroup> findByNames(long directoryId,
                                      Collection<String> groupnames)
Bulk find of groups using SQL disjunction.

Parameters:
directoryId - the directory to search for the groups.
groupnames - names of groups to find
Returns:
collection of found groups.


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.