public class SimpleBioEntryRelationship extends AbstractChangeable implements BioEntryRelationship
RANK| Modifier | Constructor and Description |
|---|---|
protected |
SimpleBioEntryRelationship() |
|
SimpleBioEntryRelationship(BioEntry object,
BioEntry subject,
ComparableTerm term,
java.lang.Integer rank)
Creates a new instance of SimpleBioEntryRelationship.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object o)
A relationship is compared first by rank, then object, subject, and term.
|
boolean |
equals(java.lang.Object obj)
Relationships are equal if they share the same rank, object, subject and term.
|
java.lang.Integer |
getId()
Gets the Hibernate ID.
|
BioEntry |
getObject()
Returns the object of this relationship (ie.
|
java.lang.Integer |
getRank()
Returns the rank of this relationship.
|
BioEntry |
getSubject()
Returns the subject of this relationship (ie.
|
ComparableTerm |
getTerm()
Returns the term describing the relationship.
|
int |
hashCode() |
void |
setId(java.lang.Integer id)
Sets the Hibernate ID.
|
void |
setRank(java.lang.Integer rank)
Sets the rank of this relationship.
|
java.lang.String |
toString()
Form is "(#rank) term(object,subject)"
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic SimpleBioEntryRelationship(BioEntry object, BioEntry subject, ComparableTerm term, java.lang.Integer rank)
rank - The rank of the relationship.subject - The subject bioentry.term - The relationship term.protected SimpleBioEntryRelationship()
public void setRank(java.lang.Integer rank)
throws ChangeVetoException
setRank in interface BioEntryRelationshiprank - Value of property rank.ChangeVetoException - if the rank rankles.public java.lang.Integer getRank()
getRank in interface BioEntryRelationshippublic BioEntry getObject()
getObject in interface BioEntryRelationshippublic BioEntry getSubject()
getSubject in interface BioEntryRelationshippublic ComparableTerm getTerm()
getTerm in interface BioEntryRelationshippublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Integer getId()
public void setId(java.lang.Integer id)
id - the Hibernate ID, if using Hibernate.