public class LikeEntity extends Object
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 and Description |
---|
LikeEntity()
For hibernate.
|
LikeEntity(ContentEntityObject content,
ConfluenceUser user,
Date creationDate) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Use business key of username and contentId pair (username and contentId is unique and is enforced by database unique constraint).
|
ContentEntityObject |
getContent() |
Date |
getCreationDate() |
long |
getId() |
ConfluenceUser |
getUser() |
int |
hashCode() |
void |
setContent(ContentEntityObject content) |
void |
setCreationDate(Date creationDate) |
void |
setId(long id) |
void |
setUser(ConfluenceUser user) |
public LikeEntity()
public LikeEntity(ContentEntityObject content, ConfluenceUser user, Date creationDate)
public ContentEntityObject getContent()
public ConfluenceUser getUser()
public Date getCreationDate()
public long getId()
public void setContent(ContentEntityObject content)
public void setUser(ConfluenceUser user)
public void setCreationDate(Date creationDate)
public void setId(long id)
public boolean equals(Object obj)
Copyright © 2003–2020 Atlassian. All rights reserved.