|
||||||||||
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
@Mapping public class Relation
The default implementation of the IRelation interface. It is mapped to the base model.
IRelation
,
Mapping
,
Serialized FormField Summary | |
---|---|
protected List<IDataSet> |
dataSets
The data sets which this relation belongs to. |
protected IEntity |
source
The source of the relation. |
protected IEntity |
target
The target of the relation. |
Fields inherited from class pl.edu.agh.cast.model.mapper.AbstractMappable |
---|
id |
Constructor Summary | |
---|---|
Relation()
The default constructor. |
|
Relation(IEntity newSource,
IEntity newTarget)
The parameterized constructor. |
Method Summary | |
---|---|
void |
addDataSet(IDataSet newSet)
Add given data set to this relation. |
Relation |
clone()
This method makes a shallow copy of the object. |
boolean |
equals(Object other)
To Timed relations are equal if their source and target nodes have the same id. |
List<IDataSet> |
getDataSets()
The data sets which this relation belongs to. |
IEntity |
getSource()
The source of the relation (getter). |
IEntity |
getTarget()
The target of the relation (getter). |
int |
hashCode()
|
void |
setDataSets(List<IDataSet> set)
The data sets which this relation belongs to. |
void |
setSource(IEntity newSource)
The source of the relation (setter). |
void |
setTarget(IEntity newTarget)
The target of the relation (setter). |
String |
toString()
|
protected void |
updateId()
|
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 |
---|
getId, setId |
Methods inherited from interface pl.edu.agh.cast.model.mapper.Mappable |
---|
getAttribute, getAttributeNames, getAttributeType, getMid, getType, setAttribute, setMid |
Field Detail |
---|
protected IEntity source
protected IEntity target
protected List<IDataSet> dataSets
Constructor Detail |
---|
public Relation()
public Relation(IEntity newSource, IEntity newTarget)
newSource
- The source of the relationnewTarget
- The target of the relationMethod Detail |
---|
protected void updateId()
public void addDataSet(IDataSet newSet)
addDataSet
in interface IRelation
newSet
- The data set to addIRelation.addDataSet(pl.edu.agh.cast.model.base.IDataSet)
@MapLink(name="dataSetRelations") public List<IDataSet> getDataSets()
getDataSets
in interface IRelation
IRelation.getDataSets()
@MapLink(direction=DST, name="relationSource") public IEntity getSource()
getSource
in interface IRelation
IRelation.getSource()
@MapLink(name="relationTarget") public IEntity getTarget()
getTarget
in interface IRelation
IRelation.getTarget()
public void setDataSets(List<IDataSet> set)
setDataSets
in interface IRelation
set
- The set of data sets to setIRelation.setDataSets(java.util.List)
public void setSource(IEntity newSource)
setSource
in interface IRelation
newSource
- The source to setIRelation.setSource(pl.edu.agh.cast.model.base.IEntity)
public void setTarget(IEntity newTarget)
setTarget
in interface IRelation
newTarget
- The targetIRelation.setTarget(pl.edu.agh.cast.model.base.IEntity)
public String toString()
toString
in class AbstractMappable
AbstractMappable.toString()
public boolean equals(Object other)
equals
in class Object
other
- The object to compare.
public int hashCode()
hashCode
in class Object
Object.hashCode()
public Relation clone()
clone
in interface Mappable
clone
in class AbstractMappable
AbstractMappable.clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |