Class HibernateLikeEntityDao
java.lang.Object
com.atlassian.confluence.impl.like.HibernateLikeEntityDao
- All Implemented Interfaces:
- LikeEntityDao
@ParametersAreNonnullByDefault
public class HibernateLikeEntityDao
extends Object
implements LikeEntityDao
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddLike(ContentEntityObject contentEntity, ConfluenceUser user) Add a like on the content entity for the given user.intcountLikes(Searchable searchable) countLikes(Collection<? extends Searchable> searchables) getLikeEntities(Collection<? extends ContentEntityObject> contentEntities) booleanhasLike(ContentEntityObject contentEntity, ConfluenceUser user) Returns true if the given user likes this content entity.voidremoveAllLikesFor(@NonNull ConfluenceUser user) Remove all likes for the given uservoidremoveAllLikesOn(ContentEntityObject contentEntity) Removes all likes (for any user) from the specified content entity.voidremoveLike(ContentEntityObject contentEntity, ConfluenceUser user) Remove like from content entity for the given user.
- 
Constructor Details- 
HibernateLikeEntityDaopublic HibernateLikeEntityDao(org.hibernate.SessionFactory sessionFactory) 
 
- 
- 
Method Details- 
addLikeDescription copied from interface:LikeEntityDaoAdd a like on the content entity for the given user.- Specified by:
- addLikein interface- LikeEntityDao
- Parameters:
- contentEntity- the content entity to add a like to
- user- User liking the content
- Returns:
- the created Like
 
- 
removeLikeDescription copied from interface:LikeEntityDaoRemove like from content entity for the given user.- Specified by:
- removeLikein interface- LikeEntityDao
- Parameters:
- contentEntity- content entity to remove like from
- user- User removing their Like
 
- 
removeAllLikesOnDescription copied from interface:LikeEntityDaoRemoves all likes (for any user) from the specified content entity.- Specified by:
- removeAllLikesOnin interface- LikeEntityDao
- Parameters:
- contentEntity- content entity
 
- 
removeAllLikesForDescription copied from interface:LikeEntityDaoRemove all likes for the given user- Specified by:
- removeAllLikesForin interface- LikeEntityDao
 
- 
hasLikeDescription copied from interface:LikeEntityDaoReturns true if the given user likes this content entity.- Specified by:
- hasLikein interface- LikeEntityDao
- Parameters:
- contentEntity- the content entity
- user- the User the Like is being checked for
- Returns:
- true if the user likes this content entity.
 
- 
getLikeEntities- Specified by:
- getLikeEntitiesin interface- LikeEntityDao
 
- 
countLikes- Specified by:
- countLikesin interface- LikeEntityDao
 
- 
countLikes- Specified by:
- countLikesin interface- LikeEntityDao
 
 
-