Class HibernateLikeEntityDao
java.lang.Object
com.atlassian.confluence.impl.like.HibernateLikeEntityDao
- All Implemented Interfaces:
LikeEntityDao
@ParametersAreNonnullByDefault
public class HibernateLikeEntityDao
extends Object
implements LikeEntityDao
-
Constructor Summary
ConstructorsConstructorDescriptionHibernateLikeEntityDao(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) -
Method Summary
Modifier 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
-
HibernateLikeEntityDao
public HibernateLikeEntityDao(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
-
-
Method Details
-
addLike
Description copied from interface:LikeEntityDaoAdd a like on the content entity for the given user.- Specified by:
addLikein interfaceLikeEntityDao- Parameters:
contentEntity- the content entity to add a like touser- User liking the content- Returns:
- the created Like
-
removeLike
Description copied from interface:LikeEntityDaoRemove like from content entity for the given user.- Specified by:
removeLikein interfaceLikeEntityDao- Parameters:
contentEntity- content entity to remove like fromuser- User removing their Like
-
removeAllLikesOn
Description copied from interface:LikeEntityDaoRemoves all likes (for any user) from the specified content entity.- Specified by:
removeAllLikesOnin interfaceLikeEntityDao- Parameters:
contentEntity- content entity
-
removeAllLikesFor
Description copied from interface:LikeEntityDaoRemove all likes for the given user- Specified by:
removeAllLikesForin interfaceLikeEntityDao
-
hasLike
Description copied from interface:LikeEntityDaoReturns true if the given user likes this content entity.- Specified by:
hasLikein interfaceLikeEntityDao- Parameters:
contentEntity- the content entityuser- the User the Like is being checked for- Returns:
- true if the user likes this content entity.
-
getLikeEntities
- Specified by:
getLikeEntitiesin interfaceLikeEntityDao
-
countLikes
- Specified by:
countLikesin interfaceLikeEntityDao
-
countLikes
- Specified by:
countLikesin interfaceLikeEntityDao
-