com.atlassian.crowd.model.application
Class ApplicationDAOHibernate

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by com.atlassian.crowd.util.persistence.hibernate.HibernateDao
              extended by com.atlassian.crowd.model.application.ApplicationDAOHibernate
All Implemented Interfaces:
ApplicationDAO, ObjectDao, org.springframework.beans.factory.InitializingBean

public class ApplicationDAOHibernate
extends HibernateDao
implements ApplicationDAO


Field Summary
 
Fields inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
batchProcessor, logger
 
Constructor Summary
ApplicationDAOHibernate()
           
 
Method Summary
 Application add(Application application)
           
 List<Application> findAuthorisedApplications(long directoryId, List<String> groupNames)
          Finds all applications that are authorised for authentication given the direcory ID and group memberships of a user.
 Application findById(long id)
           
 Application findByName(String name)
           
 Class getPersistentClass()
          All subclasses of HibernateDAO must implement this method for HibernateDao.load(long) to work correctly
 void remove(Application application)
           
 void removeDirectoryMappings(long directoryId)
           
 void removeGroupMappings(long directoryId, String groupName)
           
 void renameGroupMappings(long directoryId, String oldGroupName, String newGroupName)
           
 List<Application> search(EntityQuery query)
           
 void setAliasDAO(AliasDAO aliasDAO)
           
 void setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater)
           
 Application update(Application application)
           
 
Methods inherited from class com.atlassian.crowd.util.persistence.hibernate.HibernateDao
load, loadReference, 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

ApplicationDAOHibernate

public ApplicationDAOHibernate()
Method Detail

getPersistentClass

public Class getPersistentClass()
Description copied from class: HibernateDao
All subclasses of HibernateDAO must implement this method for HibernateDao.load(long) to work correctly

Specified by:
getPersistentClass in interface ObjectDao
Specified by:
getPersistentClass in class HibernateDao
Returns:
Class

findById

public Application findById(long id)
                     throws ObjectNotFoundException
Specified by:
findById in interface ApplicationDAO
Throws:
ObjectNotFoundException

findByName

public Application findByName(String name)
                       throws ObjectNotFoundException
Specified by:
findByName in interface ApplicationDAO
Throws:
ObjectNotFoundException

add

public Application add(Application application)
Specified by:
add in interface ApplicationDAO

update

public Application update(Application application)
Specified by:
update in interface ApplicationDAO

remove

public void remove(Application application)
Specified by:
remove in interface ApplicationDAO

search

public List<Application> search(EntityQuery query)
Specified by:
search in interface ApplicationDAO

removeDirectoryMappings

public void removeDirectoryMappings(long directoryId)
Specified by:
removeDirectoryMappings in interface ApplicationDAO

removeGroupMappings

public void removeGroupMappings(long directoryId,
                                String groupName)
Specified by:
removeGroupMappings in interface ApplicationDAO

renameGroupMappings

public void renameGroupMappings(long directoryId,
                                String oldGroupName,
                                String newGroupName)
Specified by:
renameGroupMappings in interface ApplicationDAO

findAuthorisedApplications

public List<Application> findAuthorisedApplications(long directoryId,
                                                    List<String> groupNames)
Description copied from interface: ApplicationDAO
Finds all applications that are authorised for authentication given the direcory ID and group memberships of a user.

Specified by:
findAuthorisedApplications in interface ApplicationDAO
Parameters:
directoryId - direcotry ID of the user.
groupNames - group memberships of the user in the particular directory.
Returns:
list of applications the user is authorised to authenticate with.

setHqlQueryTranslater

public void setHqlQueryTranslater(HQLQueryTranslater hqlQueryTranslater)

setAliasDAO

public void setAliasDAO(AliasDAO aliasDAO)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.