Package com.atlassian.confluence.like
Class LikeEntity
java.lang.Object
com.atlassian.confluence.like.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
ConstructorDescriptionFor hibernate.LikeEntity
(ContentEntityObject content, ConfluenceUser user, Date creationDate) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Use business key of username and contentId pair (username and contentId is unique and is enforced by database unique constraint).long
getId()
getUser()
int
hashCode()
void
setContent
(ContentEntityObject content) void
setCreationDate
(Date creationDate) void
setId
(long id) void
setUser
(ConfluenceUser user)
-
Constructor Details
-
LikeEntity
public LikeEntity()For hibernate. Don't use. -
LikeEntity
- Since:
- 5.2
-
-
Method Details
-
getContent
-
getUser
- Since:
- 5.2
-
getCreationDate
-
getId
public long getId() -
setContent
-
setUser
- Since:
- 5.2
-
setCreationDate
-
setId
public void setId(long id) -
equals
Use business key of username and contentId pair (username and contentId is unique and is enforced by database unique constraint). -
hashCode
public int hashCode()
-