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