|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
public class GroupDAOHibernate
Field Summary |
---|
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao |
---|
batchFinder, batchProcessor, logger |
Constructor Summary | |
---|---|
GroupDAOHibernate()
|
Method Summary | ||
---|---|---|
InternalGroup |
add(Group group)
Adds a new group. |
|
BatchResultWithIdReferences<Group> |
addAll(Collection<InternalGroupWithAttributes> groups)
Bulk add of groups and their attributes. |
|
BatchResult<Group> |
addAll(Set<? extends Group> groups)
Bulk add of groups. |
|
InternalGroup |
addLocal(Group group)
Add a new local group. |
|
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. |
|
InternalGroupWithAttributes |
findByNameWithAttributes(long directoryId,
String groupName)
Finds group by name. |
|
Set<InternalGroupAttribute> |
findGroupAttributes(long groupId)
Finds group attributes of the given group identified by group id. |
|
Class |
getPersistentClass()
All subclasses of HibernateDao must implement this method for HibernateDao.load(long) to
work correctly |
|
void |
remove(Group group)
Removes group. |
|
void |
removeAll(long directoryId)
Removes all groups from a directory. |
|
void |
removeAllGroups(long directoryId,
Set<String> groupNames)
Removes all the given groups. |
|
void |
removeAttribute(Group group,
String attributeName)
Remove attributes from group. |
|
InternalGroup |
rename(Group group,
String newName)
Renames group. |
|
|
search(long directoryId,
EntityQuery<T> query)
Searches for group based on the given criteria. |
|
void |
setDirectoryDao(DirectoryDao directoryDao)
|
|
void |
setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater)
|
|
void |
setInternalAttributesHelper(InternalAttributesHelper internalAttributesHelper)
|
|
void |
setMembershipDAO(InternalMembershipDao internalMembershipDao)
|
|
void |
storeAttributes(Group group,
Map<String,Set<String>> attributes)
Stores attributes into group. |
|
InternalGroup |
update(Group group)
Updates group. |
Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao |
---|
load, load, loadReference, loadReference, remove, save, saveOrUpdate, setBatchFinder, setBatchProcessor, update |
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 |
Constructor Detail |
---|
public GroupDAOHibernate()
Method Detail |
---|
public Class getPersistentClass()
HibernateDao
HibernateDao.load(long)
to
work correctly
getPersistentClass
in class HibernateDao
public InternalGroup findByName(long directoryId, String groupName) throws GroupNotFoundException
InternalGroupDao
findByName
in interface InternalGroupDao
findByName
in interface GroupDao
directoryId
- Directory id.groupName
- Group name.
GroupNotFoundException
- If the group cannot be found.public InternalGroupWithAttributes findByNameWithAttributes(long directoryId, String groupName) throws GroupNotFoundException
GroupDao
GroupDao.findByName(long, String)
in that it also returns
the group attributes associated with the retrieved group.
findByNameWithAttributes
in interface GroupDao
directoryId
- the ID of the directory to look for groupgroupName
- group name
GroupNotFoundException
- if the group does not existpublic Set<InternalGroupAttribute> findGroupAttributes(long groupId)
InternalGroupDao
findGroupAttributes
in interface InternalGroupDao
groupId
- Group id.
public InternalGroup add(Group group) throws DirectoryNotFoundException
GroupDao
add
in interface GroupDao
group
- group
DirectoryNotFoundException
- if the directory specified in group object does not existpublic InternalGroup addLocal(Group group) throws DirectoryNotFoundException
GroupDao
addLocal
in interface GroupDao
group
- group
DirectoryNotFoundException
- if the directory specified in group object does not existpublic InternalGroup update(Group group) throws GroupNotFoundException
GroupDao
update
in interface GroupDao
group
- group
GroupNotFoundException
- if the group does not existpublic InternalGroup rename(Group group, String newName) throws GroupNotFoundException
GroupDao
rename
in interface GroupDao
group
- groupnewName
- the new name
GroupNotFoundException
- if the group does not existpublic void storeAttributes(Group group, Map<String,Set<String>> attributes) throws GroupNotFoundException
GroupDao
storeAttributes
in interface GroupDao
group
- groupattributes
- attributes
GroupNotFoundException
- if the group does not existpublic void removeAttribute(Group group, String attributeName) throws GroupNotFoundException
GroupDao
removeAttribute
in interface GroupDao
group
- groupattributeName
- attribute to be removed
GroupNotFoundException
- if the group does not existpublic void remove(Group group) throws GroupNotFoundException
GroupDao
remove
in interface GroupDao
group
- group
GroupNotFoundException
- if the group does not existpublic void removeAllGroups(long directoryId, Set<String> groupNames)
GroupDao
removeAllGroups
in interface GroupDao
directoryId
- directory to perform the operationgroupNames
- groups to be removedpublic void removeAll(long directoryId)
InternalGroupDao
removeAll
in interface InternalGroupDao
directoryId
- Directory Id.public <T> List<T> search(long directoryId, EntityQuery<T> query)
GroupDao
search
in interface GroupDao
directoryId
- directory to perform the search operation onquery
- criteria
public BatchResult<Group> addAll(Set<? extends Group> groups) throws DirectoryNotFoundException
GroupDao
addAll
in interface GroupDao
groups
- to be added
DirectoryNotFoundException
- if the directory cannot be foundpublic BatchResultWithIdReferences<Group> addAll(Collection<InternalGroupWithAttributes> groups)
InternalGroupDao
addAll
in interface InternalGroupDao
groups
- Groups with attributes.
public Collection<InternalGroup> findByNames(long directoryID, Collection<String> groupnames)
InternalGroupDao
findByNames
in interface InternalGroupDao
directoryID
- the directory to search for the groups.groupnames
- names of groups to find
public void setDirectoryDao(DirectoryDao directoryDao)
public void setMembershipDAO(InternalMembershipDao internalMembershipDao)
public void setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater)
public void setInternalAttributesHelper(InternalAttributesHelper internalAttributesHelper)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |