2015-01-03 16:34:32 +01:00
|
|
|
package com.minres.scviewer.database.text
|
2015-01-01 23:17:32 +01:00
|
|
|
|
2015-01-03 16:34:32 +01:00
|
|
|
import com.minres.scviewer.database.ITrRelation
|
|
|
|
import com.minres.scviewer.database.ITransaction;
|
|
|
|
import com.minres.scviewer.database.RelationType;
|
2015-01-01 23:17:32 +01:00
|
|
|
|
2015-01-03 16:34:32 +01:00
|
|
|
class Relation implements ITrRelation {
|
2015-01-01 23:17:32 +01:00
|
|
|
Transaction source
|
|
|
|
|
|
|
|
Transaction target
|
|
|
|
|
|
|
|
RelationType relationType
|
|
|
|
|
|
|
|
|
2015-01-03 16:34:32 +01:00
|
|
|
public Relation(RelationType relationType, Transaction source, Transaction target) {
|
2015-01-01 23:17:32 +01:00
|
|
|
this.source = source;
|
|
|
|
this.target = target;
|
|
|
|
this.relationType = relationType;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public RelationType getRelationType() {
|
|
|
|
return relationType;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ITransaction getSource() {
|
|
|
|
return source;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ITransaction getTarget() {
|
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|