com.atlassian.crowd.model.directory
Interface DirectoryDAO

All Superinterfaces:
ObjectDao
All Known Implementing Classes:
DirectoryDAOHibernate

public interface DirectoryDAO
extends ObjectDao

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


Method Summary
 Directory add(Directory directory)
          Adds the Directory to the datastore.
 Directory findByID(long ID)
          Finds a given Directory based on the passed in ID.
 Directory findByName(java.lang.String name)
          Finds the Directory based on the passed in directory name.
 void remove(Directory directory)
          Removes a Directory from the datastore.
 java.util.List<Directory> search(SearchContext searchContext)
          Performs a search for Directorys based on a given SearchContext
 Directory update(Directory directory)
          Updates an Directory in the datastore.
 
Methods inherited from interface com.atlassian.crowd.util.persistence.hibernate.ObjectDao
getPersistentClass, load, remove, save, update
 

Method Detail

add

Directory add(Directory directory)
              throws org.springframework.dao.DataAccessException
Adds the Directory to the datastore.

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

findByID

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

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

search

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

Parameters:
searchContext - The search context to find a given list of directories.
Returns:
A List of Directorys found from the SearchContext.
Throws:
org.springframework.dao.DataAccessException - Generic persistance exception thrown if searching for the directory fails.

findByName

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

Parameters:
name - The name of the directory to find.
Returns:
The Directory from the datastore.
Throws:
org.springframework.dao.DataAccessException - Generic persistance exception thrown if finding the directory fails.
ObjectNotFoundException - If the Directory based on the passed in name is not found.

update

Directory update(Directory directory)
                 throws ObjectNotFoundException,
                        org.springframework.dao.DataAccessException
Updates an Directory in the datastore.

Parameters:
directory - The directory to update.
Returns:
The updated Directory.
Throws:
org.springframework.dao.DataAccessException - Generic persistance exception thrown if updating the directory fails.
ObjectNotFoundException - if the given Directory cannot be found

remove

void remove(Directory directory)
            throws org.springframework.dao.DataAccessException
Removes a Directory from the datastore.

Parameters:
directory - The directory to remove.
Throws:
org.springframework.dao.DataAccessException - Generic persistance exception thrown if removing the directory fails.


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.