public abstract class RelationshipImpl extends java.lang.Object implements Relationship
| Constructor and Description |
|---|
RelationshipImpl(java.lang.String id1,
java.lang.String id2) |
RelationshipImpl(java.lang.String id1,
java.lang.String id2,
java.util.Map attrs) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getAttribute(java.lang.String attr)
Get the value of the specified attribute
attr. |
java.util.Set |
getAttributeNames()
Provides a set of all the attribute names.
|
java.util.Map |
getAttributes()
Provides a map of all attribute-value pair of this identity.
|
java.lang.String |
getID1()
Provides a UID of the first identity.
|
Identity |
getId1Entity()
Returns the first identity.
|
java.lang.String |
getID2()
Provides a UID of the second identity.
|
Identity |
getId2Entity()
Returns the second identity.
|
void |
setAttribute(java.lang.String attr,
java.lang.Object val)
Adds the attribute
attr and it's value val. |
void |
setId1Entity(Identity id1)
Sets the first identity.
|
void |
setId2Entity(Identity id2)
Sets the second identity
|
java.lang.String |
toString()
Returns the string representation of this Relationship.
|
public RelationshipImpl(java.lang.String id1,
java.lang.String id2)
public RelationshipImpl(java.lang.String id1,
java.lang.String id2,
java.util.Map attrs)
public Identity getId1Entity()
RelationshipgetId1Entity in interface Relationshippublic void setId1Entity(Identity id1)
RelationshipsetId1Entity in interface Relationshipid1 - the first identitypublic Identity getId2Entity()
RelationshipgetId2Entity in interface Relationshippublic void setId2Entity(Identity id2)
RelationshipsetId2Entity in interface Relationshipid2 - the second identitypublic java.lang.String getID1()
RelationshipgetID1 in interface Relationshippublic java.lang.String getID2()
RelationshipgetID2 in interface Relationshippublic void setAttribute(java.lang.String attr,
java.lang.Object val)
Relationshipattr and it's value val.setAttribute in interface Relationshipattr - The attribute to be added.val - The value of the attribute.public java.lang.Object getAttribute(java.lang.String attr)
Relationshipattr.getAttribute in interface Relationshipattr - The attribute whose value is to be returned.public java.util.Map getAttributes()
RelationshipgetAttributes in interface Relationshipmap of all attribute-value pair of this identity.public java.util.Set getAttributeNames()
RelationshipgetAttributeNames in interface Relationshippublic java.lang.String toString()
RelationshiptoString in interface RelationshiptoString in class java.lang.Object