com.atlassian.crowd.model.application
Interface ApplicationDAO

All Superinterfaces:
ObjectDao
All Known Implementing Classes:
ApplicationDAOHibernate

public interface ApplicationDAO
extends ObjectDao

Persistance methods necessary to modify integrated applications with the Crowd security server.


Method Summary
 Application add(Application application)
          Adds the Application to the datastore.
 void addDirectoryMapping(DirectoryMapping directoryMapping)
           
 Application findByID(long ID)
          Finds a given Application based on the passed in ID.
 Application findByName(java.lang.String name)
          Finds the Application based on the passed in application name.
 long findTotal()
          Finds the total number of integrated applications.
 void remove(Application application)
          Removes an Application from the datastore
 java.util.List search(SearchContext searchContext)
          Performs a search for Applications based on a given SearchContext
 Application update(Application application)
          Updates an Application in the datastore
 
Methods inherited from interface com.atlassian.crowd.util.persistence.hibernate.ObjectDao
getPersistentClass, load, remove, save, update
 

Method Detail

add

Application add(Application application)
                throws org.springframework.dao.DataAccessException
Adds the Application to the datastore.

Parameters:
application - the application to persist
Returns:
the persisted application
Throws:
org.springframework.dao.DataAccessException - generic persistance exception thrown if adding the application fails

findByName

Application findByName(java.lang.String name)
                       throws org.springframework.dao.DataAccessException,
                              ObjectNotFoundException
Finds the Application based on the passed in application name.

Parameters:
name - the name of the application to find.
Returns:
the Application from the datastore
Throws:
org.springframework.dao.DataAccessException - generic persistance exception thrown if finding the application fails
ObjectNotFoundException - if the Application based on the passed in name is not found

findTotal

long findTotal()
               throws org.springframework.dao.DataAccessException
Finds the total number of integrated applications.

Returns:
The total number of applications.
Throws:
PersistenceException - Generic persistance exception thrown if finding the application fails.
org.springframework.dao.DataAccessException

search

java.util.List search(SearchContext searchContext)
                      throws org.springframework.dao.DataAccessException
Performs a search for Applications based on a given SearchContext

Parameters:
searchContext - the search context to find a given list of applications.
Returns:
A List of Applications found from the SearchContext.
Throws:
org.springframework.dao.DataAccessException - generic persistance exception thrown if searching for the application fails

findByID

Application findByID(long ID)
                     throws org.springframework.dao.DataAccessException,
                            ObjectNotFoundException
Finds a given Application based on the passed in ID.

Parameters:
ID - the id of the Application you are trying to find.
Returns:
the Application
Throws:
org.springframework.dao.DataAccessException - Generic persistance exception thrown if finding the application fails
ObjectNotFoundException - if the Application based on the passed in ID is not found

update

Application update(Application application)
                   throws org.springframework.dao.DataAccessException
Updates an Application in the datastore

Parameters:
application - the application to update
Returns:
the updated Application
Throws:
org.springframework.dao.DataAccessException - generic persistance exception thrown if updating the application fails

remove

void remove(Application application)
            throws org.springframework.dao.DataAccessException
Removes an Application from the datastore

Parameters:
application - the application to remove
Throws:
org.springframework.dao.DataAccessException - generic persistance exception thrown if removing the application fails

addDirectoryMapping

void addDirectoryMapping(DirectoryMapping directoryMapping)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.