com.atlassian.crowd.dao.group
Interface InternalGroupDao

All Superinterfaces:
GroupDao
All Known Implementing Classes:
GroupDAOHibernate

public interface InternalGroupDao
extends GroupDao

Persistance methods necessary to modify an InternalDirectory group.


Method Summary
 BatchResultWithIdReferences<Group> addAll(Collection<InternalGroupWithAttributes> groups)
          Bulk add of groups and their attributes.
 InternalGroup findByName(long directoryId, String groupName)
          Finds internal group by directory id and group name.
 Collection<InternalGroup> findByNames(long directoryId, Collection<String> groupnames)
          Bulk find of groups using SQL disjunction.
 Set<InternalGroupAttribute> findGroupAttributes(long groupId)
          Finds group attributes of the given group identified by group id.
 void removeAll(long directoryId)
          Removes all groups from a directory.
 
Methods inherited from interface com.atlassian.crowd.embedded.spi.GroupDao
add, addAll, addLocal, findByNameWithAttributes, remove, removeAllGroups, removeAttribute, rename, search, storeAttributes, update
 

Method Detail

findByName

InternalGroup findByName(long directoryId,
                         String groupName)
                         throws GroupNotFoundException
Finds internal group by directory id and group name.

Specified by:
findByName in interface GroupDao
Parameters:
directoryId - Directory id.
groupName - Group name.
Returns:
An internal group.
Throws:
GroupNotFoundException - If the group cannot be found.

findGroupAttributes

Set<InternalGroupAttribute> findGroupAttributes(long groupId)
Finds group attributes of the given group identified by group id.

Parameters:
groupId - Group id.
Returns:
Set of group attributes.

removeAll

void removeAll(long directoryId)
Removes all groups from a directory.

Parameters:
directoryId - Directory Id.

addAll

BatchResultWithIdReferences<Group> addAll(Collection<InternalGroupWithAttributes> groups)
Bulk add of groups and their attributes.

Parameters:
groups - Groups with attributes.
Returns:
Batch result.

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 © 2013 Atlassian. All Rights Reserved.