magoffin.matt.ma2.dao
Interface CollectionDao

All Superinterfaces:
magoffin.matt.dao.GenericDao<Collection,java.lang.Long>
All Known Implementing Classes:
HibernateCollectionDao

public interface CollectionDao
extends magoffin.matt.dao.GenericDao<Collection,java.lang.Long>

DAO for Collection objects.

Version:
$Revision: 43 $ $Date: 2007-10-21 11:10:01 +1300 (Sun, 21 Oct 2007) $
Author:
matt.magoffin

Method Summary
 java.util.List<Collection> findCollectionsForUser(java.lang.Long userId)
          Find all collections owned by a given user.
 Collection getCollectionForMediaItem(java.lang.Long mediaItemId)
          Get the collection a MediaItem is in.
 Collection getCollectionWithItems(java.lang.Long collectionId)
          Get an Collection with it's items fully populated.
 
Methods inherited from interface magoffin.matt.dao.GenericDao
delete, get, store
 

Method Detail

findCollectionsForUser

java.util.List<Collection> findCollectionsForUser(java.lang.Long userId)
Find all collections owned by a given user.

Parameters:
userId - the ID of the user to find the collections for
Returns:
list of found collections, or empty List if none found

getCollectionForMediaItem

Collection getCollectionForMediaItem(java.lang.Long mediaItemId)
Get the collection a MediaItem is in.

Parameters:
mediaItemId - the ID of the media item
Returns:
the collection

getCollectionWithItems

Collection getCollectionWithItems(java.lang.Long collectionId)
Get an Collection with it's items fully populated.

Parameters:
collectionId - the ID of the collection
Returns:
the Collection, or null if not found