com.atlassian.confluence.like
Class HibernateLikeEntityDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate.support.HibernateDaoSupport
com.atlassian.hibernate.HibernateObjectDao
com.atlassian.confluence.like.HibernateLikeEntityDao
- All Implemented Interfaces:
- ObjectDao, LikeEntityDao, org.springframework.beans.factory.InitializingBean
public class HibernateLikeEntityDao
- extends HibernateObjectDao
- implements LikeEntityDao
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao |
findAll, findAllSorted, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, uniqueResult, updateModificationData |
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
checkDaoConfig, 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 |
HibernateLikeEntityDao
public HibernateLikeEntityDao(net.sf.hibernate.SessionFactory sessionFactory)
addLike
public LikeEntity addLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
- Description copied from interface:
LikeEntityDao
- Add a like on the content entity for the given user.
- Specified by:
addLike
in interface LikeEntityDao
- Parameters:
contentEntity
- the content entity to add a like touser
- User liking the content
- Returns:
- the created Like
removeLike
public void removeLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
- Description copied from interface:
LikeEntityDao
- Remove like from content entity for the given user.
- Specified by:
removeLike
in interface LikeEntityDao
- Parameters:
contentEntity
- content entity to remove like fromuser
- User removing their Like
removeAllLikesOn
public void removeAllLikesOn(ContentEntityObject contentEntity)
- Description copied from interface:
LikeEntityDao
- Removes all likes (for any user) from the specified content entity.
- Specified by:
removeAllLikesOn
in interface LikeEntityDao
- Parameters:
contentEntity
- content entity
removeAllLikesFor
public void removeAllLikesFor(java.lang.String username)
- Description copied from interface:
LikeEntityDao
- Removes all likes (for any user) from the specified content entity.
- Specified by:
removeAllLikesFor
in interface LikeEntityDao
- Parameters:
username
- the name of the user to remove all likes for
hasLike
public boolean hasLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
- Description copied from interface:
LikeEntityDao
- Returns true if the given user likes this content entity.
- Specified by:
hasLike
in interface LikeEntityDao
- Parameters:
contentEntity
- the content entityuser
- the User the Like is being checked for
- Returns:
- true if the user likes this content entity.
getLikeEntities
public java.util.List<LikeEntity> getLikeEntities(@NotNull
java.util.Collection<? extends ContentEntityObject> contentEntities)
- Specified by:
getLikeEntities
in interface LikeEntityDao
countLikes
public int countLikes(com.atlassian.bonnie.Searchable searchable)
- Specified by:
countLikes
in interface LikeEntityDao
countLikes
public java.util.Map<com.atlassian.bonnie.Searchable,java.lang.Integer> countLikes(java.util.Collection<? extends com.atlassian.bonnie.Searchable> searchables)
- Specified by:
countLikes
in interface LikeEntityDao
getPersistentClass
public java.lang.Class getPersistentClass()
- Specified by:
getPersistentClass
in interface ObjectDao
Copyright © 2003-2014 Atlassian. All Rights Reserved.