|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
magoffin.matt.dao.hbm.GenericHibernateDao<MediaItem,java.lang.Long>
magoffin.matt.ma2.dao.hbm.HibernateMediaItemDao
public class HibernateMediaItemDao
Hibernate implementation of MediaItemDao.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class magoffin.matt.dao.hbm.GenericHibernateDao |
|---|
magoffin.matt.dao.hbm.GenericHibernateDao.UpdateMode |
| Nested classes/interfaces inherited from interface magoffin.matt.dao.BatchableDao |
|---|
magoffin.matt.dao.BatchableDao.BatchCallback<T>, magoffin.matt.dao.BatchableDao.BatchCallbackResult, magoffin.matt.dao.BatchableDao.BatchMode, magoffin.matt.dao.BatchableDao.BatchOptions, magoffin.matt.dao.BatchableDao.BatchResult |
| Field Summary | |
|---|---|
static java.lang.String |
QUERY_MEDIA_ITEMS_FOR_ALBUM
Find all MediaItems for a Album. |
static java.lang.String |
QUERY_MEDIA_ITEMS_FOR_COLLECTION
Find all MediaItems for a Collection. |
static java.lang.String |
QUERY_MEDIA_ITEMS_FOR_IDS
Find all MediaItems for a list of IDs. |
static java.lang.String |
QUERY_MEDIA_ITEMS_FOR_PATH
Find all MediaItems for a path. |
static java.lang.String |
QUERY_MEDIA_ITEMS_OF_COLLECTION_FOR_ALBUM
Find all MediaItems and Albums for a Collection. |
| Fields inherited from class magoffin.matt.dao.hbm.GenericHibernateDao |
|---|
DEFAULT_BATCH_FLUSH_COUNT, log |
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Fields inherited from interface magoffin.matt.ma2.dao.MediaItemDao |
|---|
BATCH_NAME_INDEX, BATCH_NAME_PROCESS_MEDIA_IDS, BATCH_PROCESS_PARAM_MEDIA_IDS_LIST |
| Constructor Summary | |
|---|---|
HibernateMediaItemDao()
Default constructor. |
|
| Method Summary | |
|---|---|
magoffin.matt.dao.BatchableDao.BatchResult |
batchProcess(magoffin.matt.dao.BatchableDao.BatchCallback<MediaItem> callback,
magoffin.matt.dao.BatchableDao.BatchOptions options)
|
java.util.List<MediaItem> |
findItemsForAlbum(java.lang.Long albumId)
Find all MediaItems for a specific album. |
java.util.List<MediaItem> |
findItemsForCollection(java.lang.Long collectionId)
Find all MediaItems for a specific collection. |
MediaItem |
getItemForPath(java.lang.Long collectionId,
java.lang.String path)
Find a MediaItem by its path and a specific collection. |
MediaItem |
getMediaItemWithInfo(java.lang.Long itemId)
Get a MediaItem fully populated (with metadata, etc). |
protected java.lang.Long |
getPrimaryKey(MediaItem domainObject)
|
java.lang.String |
getRemoveItemsFromAlbumsQuery()
|
protected java.lang.String |
getRemoveItemsFromCollectionsQuery()
|
java.util.List<MediaItem> |
removeItemsFromAlbums(java.lang.Long[] itemIds)
Remove a set of MediaItems from any albums they reside in. |
java.util.List<MediaItem> |
removeItemsFromCollections(java.lang.Long[] itemIds)
Remove a set of media items from the collections they are in. |
java.util.List<MediaItem> |
removeItemsOfCollectionFromAlbums(java.lang.Long collectionId)
Find all MediaItems for a specific collection and then remove them from any album they reside in. |
void |
setRemoveItemsFromAlbumsQuery(java.lang.String removeItemsFromAlbumsQuery)
|
protected void |
setRemoveItemsFromCollectionsQuery(java.lang.String removeItemsFromCollectionsQuery)
|
| Methods inherited from class magoffin.matt.dao.hbm.GenericHibernateDao |
|---|
delete, executeLiveCriteriaBatchCallback, executeNamedQueryBatchCallback, executeStatelessCriteriaBatchCallback, findByNamedQuery, findByNamedQuery, findByNamedQuery, findByNamedQuery, findByNamedQuery, get, getBatchFlushCount, getType, getUpdateMode, save, setBatchFlushCount, setUpdateMode, store, update |
| Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
|---|
checkDaoConfig, closeSessionIfNecessary, 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 magoffin.matt.dao.GenericDao |
|---|
delete, get, store |
| Field Detail |
|---|
public static final java.lang.String QUERY_MEDIA_ITEMS_FOR_PATH
public static final java.lang.String QUERY_MEDIA_ITEMS_FOR_COLLECTION
public static final java.lang.String QUERY_MEDIA_ITEMS_FOR_ALBUM
public static final java.lang.String QUERY_MEDIA_ITEMS_FOR_IDS
public static final java.lang.String QUERY_MEDIA_ITEMS_OF_COLLECTION_FOR_ALBUM
| Constructor Detail |
|---|
public HibernateMediaItemDao()
| Method Detail |
|---|
protected java.lang.Long getPrimaryKey(MediaItem domainObject)
getPrimaryKey in class magoffin.matt.dao.hbm.GenericHibernateDao<MediaItem,java.lang.Long>public java.util.List<MediaItem> findItemsForAlbum(java.lang.Long albumId)
MediaItemDao
findItemsForAlbum in interface MediaItemDaoalbumId - the ID of the album
public java.util.List<MediaItem> findItemsForCollection(java.lang.Long collectionId)
MediaItemDao
findItemsForCollection in interface MediaItemDaocollectionId - the ID of the collection
public MediaItem getItemForPath(java.lang.Long collectionId,
java.lang.String path)
MediaItemDao
getItemForPath in interface MediaItemDaocollectionId - the ID of the collection the item is inpath - the item's path
public MediaItem getMediaItemWithInfo(java.lang.Long itemId)
MediaItemDao
getMediaItemWithInfo in interface MediaItemDaoitemId - the ID of the item to get
public java.util.List<MediaItem> removeItemsFromAlbums(java.lang.Long[] itemIds)
MediaItemDao
removeItemsFromAlbums in interface MediaItemDaoitemIds - the IDs of the items to remove from albums
public java.util.List<MediaItem> removeItemsFromCollections(java.lang.Long[] itemIds)
MediaItemDao
removeItemsFromCollections in interface MediaItemDaoitemIds - the IDs of the items to remove from collections
public java.util.List<MediaItem> removeItemsOfCollectionFromAlbums(java.lang.Long collectionId)
MediaItemDao
removeItemsOfCollectionFromAlbums in interface MediaItemDaocollectionId - the ID of the collection
public magoffin.matt.dao.BatchableDao.BatchResult batchProcess(magoffin.matt.dao.BatchableDao.BatchCallback<MediaItem> callback,
magoffin.matt.dao.BatchableDao.BatchOptions options)
batchProcess in interface magoffin.matt.dao.BatchableDao<MediaItem>public java.lang.String getRemoveItemsFromAlbumsQuery()
public void setRemoveItemsFromAlbumsQuery(java.lang.String removeItemsFromAlbumsQuery)
removeItemsFromAlbumsQuery - The removeItemsFromAlbumsQuery to set.protected java.lang.String getRemoveItemsFromCollectionsQuery()
protected void setRemoveItemsFromCollectionsQuery(java.lang.String removeItemsFromCollectionsQuery)
removeItemsFromCollectionsQuery - the removeItemsFromCollectionsQuery to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||