|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.model.mapper.AbstractMappable
pl.edu.agh.cast.model.base.Relation
pl.edu.agh.cast.model.base.TimedRelation
@Mapping public class TimedRelation
The timed relation represents relation with assigned date. The date might be used to order relations in time-line editor.
Field Summary | |
---|---|
protected Date |
date
The date of the relation. |
Fields inherited from class pl.edu.agh.cast.model.base.Relation |
---|
dataSets, source, target |
Fields inherited from class pl.edu.agh.cast.model.mapper.AbstractMappable |
---|
id |
Constructor Summary | |
---|---|
TimedRelation()
Default constructor. |
|
TimedRelation(IEntity src,
IEntity dst,
Date newDate)
Parameterized constructor. |
Method Summary | |
---|---|
boolean |
equals(Object other)
Two Timed relations are equal if their source and target nodes have the same id and their dates are equal. |
boolean |
fixedEquals(ITimedRelation relation)
Checks if given timed relation is equal in terms of timed relation not the domain-specific sense, to the given timed relation. |
Date |
getDate()
Get the date of the relation. |
int |
getFixedHashCode()
Remark: the hash code of the id of the TimedRelation is dependent on all the data which are checked in the equals method, because the id is constructed of the source and target nodes IDs and the date. |
ITimedRelation |
getTimedRelation()
Returns object of class TimedRelation no matter if the object is of class ITimedRelation or class which inherits from it. |
int |
hashCode()
|
void |
setDate(Date newDate)
Set the date of the relation. |
protected void |
updateId()
|
Methods inherited from class pl.edu.agh.cast.model.base.Relation |
---|
addDataSet, clone, getDataSets, getSource, getTarget, setDataSets, setSource, setTarget, toString |
Methods inherited from class pl.edu.agh.cast.model.mapper.AbstractMappable |
---|
getAttribute, getAttributeNames, getAttributeType, getId, getMid, getType, setAttribute, setId, setMid |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface pl.edu.agh.cast.model.base.IRelation |
---|
addDataSet, getDataSets, getId, getSource, getTarget, setDataSets, setId, setSource, setTarget |
Methods inherited from interface pl.edu.agh.cast.model.mapper.Mappable |
---|
clone, getAttribute, getAttributeNames, getAttributeType, getMid, getType, setAttribute, setMid |
Field Detail |
---|
protected Date date
Constructor Detail |
---|
public TimedRelation()
public TimedRelation(IEntity src, IEntity dst, Date newDate)
src
- The source of the relationdst
- The target of the relationsnewDate
- The date of occurrence of the relation.Method Detail |
---|
@MapAttribute(typeName="Date") public Date getDate()
getDate
in interface ITimedRelation
public void setDate(Date newDate)
newDate
- the date to setprotected void updateId()
updateId
in class Relation
public boolean equals(Object other)
equals
in class Relation
other
- object to check
public int hashCode()
hashCode
in class Relation
Relation.hashCode()
public final ITimedRelation getTimedRelation()
getTimedRelation
in interface ITimedRelation
public final int getFixedHashCode()
getFixedHashCode
in interface ITimedRelation
public final boolean fixedEquals(ITimedRelation relation)
fixedEquals
in interface ITimedRelation
relation
- The relation which is checked for equality.
ITimedRelation.fixedEquals(pl.edu.agh.cast.model.base.ITimedRelation)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |