pl.edu.agh.cast.model.base
Interface IRelation

All Superinterfaces:
Mappable
All Known Subinterfaces:
ITimedRelation
All Known Implementing Classes:
Relation, TimedRelation

public interface IRelation
extends Mappable

The IRelation interface represents relations, which are by default displayed as connection between entities.

Each relation has its own id which is viewable by the user, so it should allow the identify the relation. However, in some cases (e.g. connection reported by two different companies may differ in format), the id may be represented differently.

Each relation has a source and target entity, it also belong to data sets. By default it belongs only to one data set, but in some cases (consider to billings for two differen numbers which contain the same connection) it may belong to more than one.

Author:
AGH CAST Team

Method Summary
 void addDataSet(IDataSet set)
          Add given data set to this relation.
 List<IDataSet> getDataSets()
          The data sets which this relation belongs to.
 String getId()
          The id of the relation (getter).
 IEntity getSource()
          The source of the relation (getter).
 IEntity getTarget()
          The target of the relation (getter).
 void setDataSets(List<IDataSet> set)
          The data sets which this relation belongs to.
 void setId(String id)
          The id of the relation (setter).
 void setSource(IEntity source)
          The source of the relation (setter).
 void setTarget(IEntity target)
          The target of the relation (setter).
 
Methods inherited from interface pl.edu.agh.cast.model.mapper.Mappable
clone, getAttribute, getAttributeNames, getAttributeType, getMid, getType, setAttribute, setMid
 

Method Detail

getId

String getId()
The id of the relation (getter).

Specified by:
getId in interface Mappable
Returns:
the id

setId

void setId(String id)
The id of the relation (setter).

Specified by:
setId in interface Mappable
Parameters:
id - The id to set

getSource

IEntity getSource()
The source of the relation (getter).

Returns:
The source

setSource

void setSource(IEntity source)
The source of the relation (setter).

Parameters:
source - The source to set

getTarget

IEntity getTarget()
The target of the relation (getter).

Returns:
The target

setTarget

void setTarget(IEntity target)
The target of the relation (setter).

Parameters:
target - The target

getDataSets

List<IDataSet> getDataSets()
The data sets which this relation belongs to. (getter)

Returns:
Set of data sets

setDataSets

void setDataSets(List<IDataSet> set)
The data sets which this relation belongs to. (getter)

Parameters:
set - The set of data sets to set

addDataSet

void addDataSet(IDataSet set)
Add given data set to this relation.

Parameters:
set - The data set to add


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.