public abstract class UserNoteEntity extends Object implements Serializable, Propertyable
Modifier and Type | Class and Description |
---|---|
static class |
UserNoteEntity.Factory
Constructs new instances of
UserNoteEntity . |
Constructor and Description |
---|
UserNoteEntity() |
Modifier and Type | Method and Description |
---|---|
String |
attributesToString()
Builds a string showing the current attribute values
|
boolean |
equals(Object object)
Returns
true if the argument is an UserNoteEntity instance and all identifiers
for this entity equal the identifiers of the argument entity. |
Long |
getId() |
Note |
getNote() |
Set<UserNoteProperty> |
getProperties()
Properties
|
int |
getRank()
The rank for this user and note.
|
abstract double |
getRankNormalized()
Get the normalized rank between 0..1 based on the stored rank and the RANK_PRECISION.
|
User |
getUser() |
int |
hashCode()
Returns a hash code based on this entity's identifiers.
|
void |
setId(Long id) |
void |
setNote(Note note) |
void |
setProperties(Set<UserNoteProperty> properties) |
void |
setRank(int rank) |
abstract void |
setRankNormalized(double normalizedRank) |
void |
setUser(User user) |
public String attributesToString()
public boolean equals(Object object)
true
if the argument is an UserNoteEntity instance and all identifiers
for this entity equal the identifiers of the argument entity. Returns false
otherwise.public Long getId()
public Note getNote()
public Set<UserNoteProperty> getProperties()
Propertyable
Properties
getProperties
in interface Propertyable
public int getRank()
The rank for this user and note. The rank is bound based on a precision defined in the specific implementation. The precision is used to convert the rank back to a value of 1 but allows to store it as a numeric for better database integration.
To be save always use the setRankNormalized instead of setRank
public abstract double getRankNormalized()
Get the normalized rank between 0..1 based on the stored rank and the RANK_PRECISION.
public User getUser()
public int hashCode()
public void setId(Long id)
public void setNote(Note note)
public void setProperties(Set<UserNoteProperty> properties)
public void setRank(int rank)
public abstract void setRankNormalized(double normalizedRank)
public void setUser(User user)
Copyright © 2019 Communote team. All rights reserved.