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
Instantiates a new relationship.- Parameters:
sender- the senderreceiver- the receiver
-
Relationship
Instantiates a new relationship.- Parameters:
sender- the senderreceiver- the receiverstatus- the status
-
Relationship
Instantiates a new relationship.- Parameters:
uuid- the uuid
-
-
Method Details
-
getSender
Gets the sender.- Returns:
- the sender
-
getReceiver
Gets the receiver.- Returns:
- the receiver
-
setSender
Sets the sender.- Parameters:
sender- the new sender
-
setReceiver
Sets the receiver.- Parameters:
receiver- the new receiver
-
getId
Gets the id.- Returns:
- the id
-
setId
Sets the id.- Parameters:
id- the new id
-
getStatus
Gets the status.- Returns:
- the status
-
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
Gets string sender + "--[" + status + "]--" + receiver -
getPartner
Gets the partner of relationship. Returns null if not found any identity in this relationship- Parameters:
identity-- Returns:
- identity
-
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
Compares to this object return true if parameter object have the same id with this -
hashCode
public int hashCode()
-