|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.like.LikeEntity
public class LikeEntity
Represents a like entity.
Likes should be modelled as a value type, but hibernate only permits value types if they are stored in the same table
as the entity type they belong to. In our use case we need a separate table for likes.
The compromise is to model likes as an entity (so we get the separate table), but just ignore the database ID.
This class should not be used outside the DAO. All client code should be interacting with the transfer object Like
.
Constructor Summary | |
---|---|
LikeEntity()
For hibernate. |
|
LikeEntity(ContentEntityObject content,
ConfluenceUser user,
java.util.Date creationDate)
|
|
LikeEntity(ContentEntityObject content,
java.lang.String username,
java.util.Date creationDate)
Deprecated. |
|
LikeEntity(long contentId,
java.lang.String username,
java.util.Date creationDate)
Deprecated. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Use business key of username and contentId pair (username and contentId is unique and is enforced by database unique constraint). |
ContentEntityObject |
getContent()
|
long |
getContentId()
Deprecated. since 4.3.4 use getContent |
java.util.Date |
getCreationDate()
|
long |
getId()
|
ConfluenceUser |
getUser()
|
java.lang.String |
getUsername()
Deprecated. since 5.2. Use getUser() instead. |
int |
hashCode()
|
void |
setContent(ContentEntityObject content)
|
void |
setContentId(long contentId)
Deprecated. since 4.3.4 use setContent |
void |
setCreationDate(java.util.Date creationDate)
|
void |
setId(long id)
|
void |
setUser(ConfluenceUser user)
|
void |
setUsername(java.lang.String username)
Deprecated. since 5.2. Use setUser(com.atlassian.confluence.user.ConfluenceUser) instead. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LikeEntity()
@Deprecated public LikeEntity(long contentId, java.lang.String username, java.util.Date creationDate)
@Deprecated public LikeEntity(ContentEntityObject content, java.lang.String username, java.util.Date creationDate)
LikeEntity(com.atlassian.confluence.core.ContentEntityObject, com.atlassian.confluence.user.ConfluenceUser, java.util.Date)
instead.public LikeEntity(ContentEntityObject content, ConfluenceUser user, java.util.Date creationDate)
Method Detail |
---|
public ContentEntityObject getContent()
public ConfluenceUser getUser()
@Deprecated public java.lang.String getUsername()
getUser()
instead.
public java.util.Date getCreationDate()
public long getId()
public void setContent(ContentEntityObject content)
@Deprecated public void setContentId(long contentId)
@Deprecated public long getContentId()
public void setUser(ConfluenceUser user)
@Deprecated public void setUsername(java.lang.String username)
setUser(com.atlassian.confluence.user.ConfluenceUser)
instead.
public void setCreationDate(java.util.Date creationDate)
public void setId(long id)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |