|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.uka.ipd.consensus.impl.SQLRatingImpl
TODO
| Field Summary |
| Fields inherited from interface de.uka.ipd.consensus.foundation.schema.Rating |
NEUTRAL, NO, YES |
| Constructor Summary | |
protected |
SQLRatingImpl(SQLRatingManagerImpl rmi,
int id,
String username,
Rateable rateable,
double value,
String comment,
long date,
long rateddate)
|
protected |
SQLRatingImpl(SQLRatingManagerImpl rmi,
int id,
User creator,
String username,
double value,
long date)
|
protected |
SQLRatingImpl(SQLRatingManagerImpl rmi,
int id,
User creator,
String username,
Rateable rateable,
double value,
String comment,
long date,
long rateddate)
|
protected |
SQLRatingImpl(SQLRatingManagerImpl rmi,
int id,
User creator,
String username,
Rateable rateable,
double value,
String comment,
long date,
long rateddate,
boolean historical)
|
| Method Summary | |
int |
compareTo(Object obj)
|
boolean |
equals(Object obj)
|
String |
getComment()
Returns the comment of the element. |
User |
getCreator()
Returns the user that created this element. |
Collection |
getHistory()
Returns a collection of Rating objects that contain all older values for this rating (i.e. the rating for this element from the creator of the rating). |
protected int |
getId()
|
protected Rateable |
getInternalRateable()
|
Rateable |
getRateable()
Returns the rated element. |
Version |
getRatedVersion()
Returns the version of the rated element. |
protected String |
getUsername()
|
double |
getValue()
Returns the rating's value from -1.0 to 1.0 (including both values). |
Version |
getVersion()
Returns the version of the versionable element. |
int |
hashCode()
|
boolean |
isHistorical()
Checks if this rating is historic, i.e. if it contains older values than the element's current rating. |
void |
setComment(User setter,
String comment)
Changes the element's comment. |
protected void |
setHistorical(boolean historical)
|
protected void |
setRateable(Rateable rateable)
|
void |
setValue(double value)
Changes the rating's value and adds the old values to the history. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected SQLRatingImpl(SQLRatingManagerImpl rmi,
int id,
User creator,
String username,
double value,
long date)
protected SQLRatingImpl(SQLRatingManagerImpl rmi,
int id,
String username,
Rateable rateable,
double value,
String comment,
long date,
long rateddate)
protected SQLRatingImpl(SQLRatingManagerImpl rmi,
int id,
User creator,
String username,
Rateable rateable,
double value,
String comment,
long date,
long rateddate)
protected SQLRatingImpl(SQLRatingManagerImpl rmi,
int id,
User creator,
String username,
Rateable rateable,
double value,
String comment,
long date,
long rateddate,
boolean historical)
| Method Detail |
protected int getId()
protected String getUsername()
protected void setRateable(Rateable rateable)
protected void setHistorical(boolean historical)
public boolean isHistorical()
Rating
isHistorical in interface Ratingtrue if this rating belongs to the rating history, false if it is a current ratingRating.getHistory(),
Rating.setValue(double),
Commentatable.setComment(User, String)public Rateable getRateable()
RatingSynonym, SuperSubclass or TypeInstance (which are Rateable, too),
use OntologyManager.checkInternalRateable() to convert the returned association into one of these wrappers.
getRateable in interface RatingOntologyManager.checkInternalRateable(Rateable)protected Rateable getInternalRateable()
public User getCreator()
Createable
getCreator in interface Createablepublic double getValue()
Rating
getValue in interface RatingRating.setValue(double)public void setValue(double value)
Rating
setValue in interface Ratingvalue - the new value from -1.0 to 1.0 (including both values)Rating.getValue(),
Rating.getHistory(),
Rating.isHistorical()public String getComment()
Commentatable
getComment in interface Commentatablenull)
public void setComment(User setter,
String comment)
throws OntologyManagerException,
DynamicRightsManagerException
Commentatable
setComment in interface Commentatablesetter - the user who wants to change the commentcomment - the new comment (null is treated as an empty string)
DynamicRightsManagerException - if the user is not allowed to change the comment
OntologyManagerException - if the comment could not be changedDynamicRightsManager.mayChangeConceptComment(User, Concept),
DynamicRightsManager.mayChangeUserComment(User, User)public Version getVersion()
Versionable
getVersion in interface Versionablenull if no version information is availablepublic Version getRatedVersion()
Rating
getRatedVersion in interface Ratingnull if no version information is availablepublic Collection getHistory()
Rating
getHistory in interface RatingnullRating.isHistorical()public boolean equals(Object obj)
public int hashCode()
public int compareTo(Object obj)
compareTo in interface Comparablepublic String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||