Class Relationship
java.lang.Object
org.exoplatform.social.core.relationship.model.Relationship
Relationship between 2 social identities
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRelationship(String uuid) Instantiates a new relationship.Relationship(Identity sender, Identity receiver) Instantiates a new relationship.Relationship(Identity sender, Identity receiver, Relationship.Type status) Instantiates a new relationship. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares to this object return true if parameter object have the same id with thisgetId()Gets the id.getPartner(Identity identity) Gets the partner of relationship.Gets the receiver.Gets the sender.Gets the status.inthashCode()booleanisReceiver(Identity identity) Checks the identity is the receiver of relationshipbooleanChecks the identity is the sender of relationshipbooleanSets the isSymetricvoidSets the id.voidsetReceiver(Identity receiver) Sets the receiver.voidSets the sender.voidsetStatus(Relationship.Type status) Sets the status.voidsetSymetric(boolean isSymetric) Gets the isSymetric.toString()Gets string sender + "--[" + status + "]--" + receiver
-
Constructor Details
-
Relationship
-
Relationship
Instantiates a new relationship.- Parameters:
sender- the senderreceiver- the receiverstatus- the status
-
Relationship
-
-
Method Details
-
getSender
-
getReceiver
-
setSender
-
setReceiver
Sets the receiver.- Parameters:
receiver- the new receiver
-
getId
-
setId
-
getStatus
-
setStatus
Sets the status.- Parameters:
status- the new status
-
setSymetric
public void setSymetric(boolean isSymetric) Gets the isSymetric.- Parameters:
isSymetric-
-
isSymetric
public boolean isSymetric()Sets the isSymetric- Returns:
- isSymetric
-
toString
-
getPartner
-
isSender
Checks the identity is the sender of relationship- Parameters:
identity-- Returns:
- boolean
-
isReceiver
Checks the identity is the receiver of relationship- Parameters:
identity-- Returns:
- boolean
-
equals
-
hashCode
-