public class HibernateLikeEntityDao extends HibernateObjectDao implements LikeEntityDao
log
NON_CACHEABLE
Constructor and Description |
---|
HibernateLikeEntityDao(net.sf.hibernate.SessionFactory sessionFactory) |
Modifier and Type | Method and Description |
---|---|
LikeEntity |
addLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
Add a like on the content entity for the given user.
|
Map<com.atlassian.bonnie.Searchable,Integer> |
countLikes(Collection<? extends com.atlassian.bonnie.Searchable> searchables) |
int |
countLikes(com.atlassian.bonnie.Searchable searchable) |
List<LikeEntity> |
getLikeEntities(Collection<? extends ContentEntityObject> contentEntities) |
Class |
getPersistentClass() |
boolean |
hasLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
Returns true if the given user likes this content entity.
|
void |
removeAllLikesFor(String username)
Removes all likes (for any user) from the specified content entity.
|
void |
removeAllLikesOn(ContentEntityObject contentEntity)
Removes all likes (for any user) from the specified content entity.
|
void |
removeLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
Remove like from content entity for the given user.
|
findAll, findAllSorted, findAllSorted, findByClassIds, 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
public HibernateLikeEntityDao(net.sf.hibernate.SessionFactory sessionFactory)
public LikeEntity addLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
LikeEntityDao
addLike
in interface LikeEntityDao
contentEntity
- the content entity to add a like touser
- User liking the contentpublic void removeLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
LikeEntityDao
removeLike
in interface LikeEntityDao
contentEntity
- content entity to remove like fromuser
- User removing their Likepublic void removeAllLikesOn(ContentEntityObject contentEntity)
LikeEntityDao
removeAllLikesOn
in interface LikeEntityDao
contentEntity
- content entitypublic void removeAllLikesFor(String username)
LikeEntityDao
removeAllLikesFor
in interface LikeEntityDao
username
- the name of the user to remove all likes forpublic boolean hasLike(ContentEntityObject contentEntity, com.atlassian.user.User user)
LikeEntityDao
hasLike
in interface LikeEntityDao
contentEntity
- the content entityuser
- the User the Like is being checked forpublic List<LikeEntity> getLikeEntities(@NotNull Collection<? extends ContentEntityObject> contentEntities)
getLikeEntities
in interface LikeEntityDao
public int countLikes(com.atlassian.bonnie.Searchable searchable)
countLikes
in interface LikeEntityDao
public Map<com.atlassian.bonnie.Searchable,Integer> countLikes(Collection<? extends com.atlassian.bonnie.Searchable> searchables)
countLikes
in interface LikeEntityDao
public Class getPersistentClass()
getPersistentClass
in interface ObjectDao
Copyright © 2003–2016 Atlassian. All rights reserved.