Class LikeEntity

java.lang.Object
com.atlassian.confluence.like.LikeEntity

public class LikeEntity extends Object
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 Details

  • Method Details

    • getContent

      public ContentEntityObject getContent()
    • getUser

      public ConfluenceUser getUser()
      Since:
      5.2
    • getCreationDate

      public Date getCreationDate()
    • getId

      public long getId()
    • setContent

      public void setContent(ContentEntityObject content)
    • setUser

      public void setUser(ConfluenceUser user)
      Since:
      5.2
    • setCreationDate

      public void setCreationDate(Date creationDate)
    • setId

      public void setId(long id)
    • equals

      public boolean equals(Object obj)
      Use business key of username and contentId pair (username and contentId is unique and is enforced by database unique constraint).
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object