|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.like.HibernateLikeDao
public class HibernateLikeDao
Constructor Summary | |
---|---|
HibernateLikeDao(net.sf.hibernate.SessionFactory sessionFactory,
PermissionManager permissionManager)
|
Method Summary | |
---|---|
void |
addLike(ContentEntityObject contentEntity)
Add a like for the current logged in user. |
Map<Long,List<Like>> |
getLikes(Collection<? extends ContentEntityObject> contentEntities)
Gets all the likes for the specified content entities (likes are ordered such that recent likes come first). |
List<Like> |
getLikes(ContentEntityObject contentEntity)
Gets all the likes for the specified content entity (likes are ordered such that recent likes come first) |
boolean |
hasLike(ContentEntityObject contentEntity)
Returns true if the current logged in 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)
Rremove like from content entity for the current logged in user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HibernateLikeDao(net.sf.hibernate.SessionFactory sessionFactory, PermissionManager permissionManager)
Method Detail |
---|
public void addLike(ContentEntityObject contentEntity)
LikeDao
addLike
in interface LikeDao
contentEntity
- the content entity to add a like topublic void removeLike(ContentEntityObject contentEntity)
LikeDao
removeLike
in interface LikeDao
contentEntity
- content entity to remove like frompublic void removeAllLikesOn(ContentEntityObject contentEntity)
LikeDao
removeAllLikesOn
in interface LikeDao
contentEntity
- content entitypublic void removeAllLikesFor(String username)
LikeDao
removeAllLikesFor
in interface LikeDao
username
- the name of the user to remove all likes forpublic boolean hasLike(ContentEntityObject contentEntity)
LikeDao
hasLike
in interface LikeDao
contentEntity
- the content entity
public List<Like> getLikes(ContentEntityObject contentEntity)
LikeDao
getLikes
in interface LikeDao
contentEntity
- the content entity
public Map<Long,List<Like>> getLikes(Collection<? extends ContentEntityObject> contentEntities)
LikeDao
getLikes
in interface LikeDao
contentEntities
- content entities
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |