|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.like.HibernateLikeEntityDao
public class HibernateLikeEntityDao
Constructor Summary | |
---|---|
HibernateLikeEntityDao(net.sf.hibernate.SessionFactory sessionFactory)
|
Method Summary | |
---|---|
LikeEntity |
addLike(ContentEntityObject contentEntity,
com.atlassian.user.User user)
Add a like on the content entity for the given user. |
List<LikeEntity> |
getLikeEntities(Collection<? extends ContentEntityObject> contentEntities)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HibernateLikeEntityDao(net.sf.hibernate.SessionFactory sessionFactory)
Method Detail |
---|
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 content
public 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 for
public List<LikeEntity> getLikeEntities(@NotNull Collection<? extends ContentEntityObject> contentEntities)
getLikeEntities
in interface LikeEntityDao
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |