|
||||||||||
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.model.group.GroupDAOHibernate
public class GroupDAOHibernate
Hibernate implementation of the GroupDAO
interface.
Field Summary |
---|
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao |
---|
batchProcessor |
Constructor Summary | |
---|---|
GroupDAOHibernate()
|
Method Summary | |
---|---|
RemoteGroup |
add(RemoteGroup group)
Adds the RemoteGroup to the datastore. |
BatchResult<RemoteGroup> |
addAll(java.util.Set<RemoteGroup> groups)
Adds a collection of RemoteGroup to the datastore. |
RemoteGroup |
findByName(long directoryID,
java.lang.String name)
Finds the RemoteGroup based on the passed in group name. |
java.util.Collection<RemoteGroup> |
findByNames(long directoryID,
java.util.Collection<java.lang.String> names)
Finds a collection of RemoteGroup by
searching the directoryID and name primary keys. |
java.lang.Class |
getPersistentClass()
All subclasses of HibernateDAO must implement this method for HibernateDao.load(long) to
work correctly |
void |
remove(RemoteGroup group)
Removes a RemoteGroup from the datastore. |
java.util.List<RemoteGroup> |
search(SearchContext searchContext)
Performs a search for RemoteGroup s based on a given SearchContext . |
RemoteGroup |
update(RemoteGroup group)
Updates an RemoteGroup in the datastore. |
Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao |
---|
load, remove, save, saveOrUpdate, 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 |
Methods inherited from interface com.atlassian.crowd.util.persistence.hibernate.ObjectDao |
---|
load, remove, save, update |
Constructor Detail |
---|
public GroupDAOHibernate()
Method Detail |
---|
public RemoteGroup add(RemoteGroup group)
GroupDAO
RemoteGroup
to the datastore.
add
in interface GroupDAO
group
- The group to persist.
GroupDAO.add(RemoteGroup)
public BatchResult<RemoteGroup> addAll(java.util.Set<RemoteGroup> groups)
GroupDAO
RemoteGroup
to the datastore.
This will attempt to batch process as much of the set as possible. If some groups fail,
it will still commit the groups that are successfully added.
If a group exists, it will be updated with the new group data (ie. overwrite).
addAll
in interface GroupDAO
groups
- The groups to persist.
public java.util.Collection<RemoteGroup> findByNames(long directoryID, java.util.Collection<java.lang.String> names) throws org.springframework.dao.DataAccessException
GroupDAO
RemoteGroup
by
searching the directoryID and name primary keys.
findByNames
in interface GroupDAO
directoryID
- directory ID to restrict search to.names
- names to find.
org.springframework.dao.DataAccessException
- generic persistence exception.public RemoteGroup findByName(long directoryID, java.lang.String name) throws ObjectNotFoundException
GroupDAO
RemoteGroup
based on the passed in group name.
findByName
in interface GroupDAO
directoryID
- the id of the Directory
you are searchingname
- The name of the group to find.
RemoteGroup
from the datastore.
ObjectNotFoundException
- If the RemoteGroup
based on the passed in name is not found.- See Also:
GroupDAO.findByName(long,String)
public java.util.List<RemoteGroup> search(SearchContext searchContext) throws InvalidSearchTermException
GroupDAO
RemoteGroup
s based on a given SearchContext
.
search
in interface GroupDAO
searchContext
- The search context to find a given list of group.
List
of RemoteGroup
s found from the SearchContext.
InvalidSearchTermException
- If there are no search terms providedGroupDAO.search(SearchContext)
public RemoteGroup update(RemoteGroup group)
GroupDAO
RemoteGroup
in the datastore.
update
in interface GroupDAO
group
- The group to update.
RemoteGroup
.GroupDAO.update(RemoteGroup)
public void remove(RemoteGroup group)
GroupDAO
RemoteGroup
from the datastore.
remove
in interface GroupDAO
group
- The group to remove.GroupDAO.remove(RemoteGroup)
public java.lang.Class getPersistentClass()
HibernateDao
HibernateDao.load(long)
to
work correctly
getPersistentClass
in interface ObjectDao
getPersistentClass
in class HibernateDao
ObjectDao.getPersistentClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |