org.silverpeas.rating
Class RaterRatingPK

java.lang.Object
  extended by com.stratelia.webactiv.util.WAPrimaryKey
      extended by com.silverpeas.util.ForeignPK
          extended by org.silverpeas.rating.ContributionRatingPK
              extended by org.silverpeas.rating.RaterRatingPK
All Implemented Interfaces:
Serializable, Cloneable

public class RaterRatingPK
extends ContributionRatingPK

This class represents a technical primary key of a rater rating.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.stratelia.webactiv.util.WAPrimaryKey
componentName, id, space
 
Constructor Summary
RaterRatingPK(String id, String componentId, String type, UserDetail rater)
           
 
Method Summary
 boolean equals(Object other)
          Comparison between two notation primary key.
 UserDetail getRater()
           
 int hashCode()
          Returns a hash code for the key
 String toString()
          Converts the contents of the key into a readable String.
 
Methods inherited from class org.silverpeas.rating.ContributionRatingPK
getContributionId, getContributionType, setContributionType
 
Methods inherited from class com.silverpeas.util.ForeignPK
getRootTableName, getTableName
 
Methods inherited from class com.stratelia.webactiv.util.WAPrimaryKey
clone, getComponentName, getId, getInstanceId, getSpace, getSpaceId, getTableName, setComponentName, setId, setSpace
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RaterRatingPK

public RaterRatingPK(String id,
                     String componentId,
                     String type,
                     UserDetail rater)
Method Detail

getRater

public UserDetail getRater()

hashCode

public int hashCode()
Description copied from class: ForeignPK
Returns a hash code for the key

Overrides:
hashCode in class ContributionRatingPK
Returns:
A hash code for this object

equals

public boolean equals(Object other)
Comparison between two notation primary key. Since various attributes of the both elements can be null, using toString() method to compare the elements avoids to check null cases for each attribute.

Overrides:
equals in class ContributionRatingPK
Parameters:
other -
Returns:
true if other is equals to this object

toString

public String toString()
Description copied from class: WAPrimaryKey
Converts the contents of the key into a readable String.

Overrides:
toString in class ContributionRatingPK
Returns:
The string representation of this object


Copyright © 2016 Silverpeas. All Rights Reserved.