|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.dao.support.DaoSupport org.springframework.orm.hibernate3.support.HibernateDaoSupport magoffin.matt.dao.hbm.GenericHibernateDao<T,PK> magoffin.matt.dao.hbm.GenericIndexableHibernateDao<Collection,java.lang.Long> magoffin.matt.ma2.dao.hbm.HibernateCollectionDao
public class HibernateCollectionDao
Hibernate implementation of CollectionDao
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class magoffin.matt.dao.hbm.GenericHibernateDao |
---|
magoffin.matt.dao.hbm.GenericHibernateDao.UpdateMode |
Field Summary | |
---|---|
static java.lang.String |
QUERY_COLLECTION_FOR_ITEM_ID
Find a Collection for an Item ID. |
static java.lang.String |
QUERY_COLLECTIONS_FOR_USER_ID
Find all Collections for a User ID. |
Fields inherited from class magoffin.matt.dao.hbm.GenericIndexableHibernateDao |
---|
DEFAULT_INDEX_BATCH_SIZE |
Fields inherited from class magoffin.matt.dao.hbm.GenericHibernateDao |
---|
DEFAULT_BATCH_FLUSH_COUNT, log |
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
HibernateCollectionDao()
Default constructor. |
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. |
protected java.lang.Long |
getPrimaryKey(Collection domainObject)
|
Methods inherited from class magoffin.matt.dao.hbm.GenericIndexableHibernateDao |
---|
getIndexBatchSize, getIndexObjectIdColumnName, getIndexObjectTableAlias, getIndexRowMapper, getIndexTimeZone, getJdbcTemplate, getSqlIndexAll, getSqlIndexDateRange, getSqlParamIdxWithDateRange, index, populateIndexRow, setIndexBatchSize, setIndexObjectIdColumnName, setIndexObjectTableAlias, setIndexRowMapper, setIndexTimeZone, setJdbcTemplate, setSqlIndexAll, setSqlIndexDateRange, setSqlParamIdxWithDateRange |
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_COLLECTIONS_FOR_USER_ID
public static final java.lang.String QUERY_COLLECTION_FOR_ITEM_ID
Constructor Detail |
---|
public HibernateCollectionDao()
Method Detail |
---|
protected java.lang.Long getPrimaryKey(Collection domainObject)
getPrimaryKey
in class magoffin.matt.dao.hbm.GenericHibernateDao<Collection,java.lang.Long>
public java.util.List<Collection> findCollectionsForUser(java.lang.Long userId)
CollectionDao
findCollectionsForUser
in interface CollectionDao
userId
- the ID of the user to find the collections for
public Collection getCollectionForMediaItem(java.lang.Long mediaItemId)
CollectionDao
getCollectionForMediaItem
in interface CollectionDao
mediaItemId
- the ID of the media item
public Collection getCollectionWithItems(java.lang.Long collectionId)
CollectionDao
getCollectionWithItems
in interface CollectionDao
collectionId
- the ID of the collection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |