2020-11-28 14:08:34 +01:00
|
|
|
package com.minres.scviewer.database.text;
|
2015-01-01 23:17:32 +01:00
|
|
|
|
2020-11-28 14:08:34 +01:00
|
|
|
import com.minres.scviewer.database.ITxRelation;
|
2015-01-06 17:14:16 +01:00
|
|
|
import com.minres.scviewer.database.ITx;
|
2015-01-03 16:34:32 +01:00
|
|
|
import com.minres.scviewer.database.RelationType;
|
2015-01-01 23:17:32 +01:00
|
|
|
|
2015-01-06 17:14:16 +01:00
|
|
|
class TxRelation implements ITxRelation {
|
2020-11-28 14:08:34 +01:00
|
|
|
final Tx source;
|
2015-01-01 23:17:32 +01:00
|
|
|
|
2020-11-28 14:08:34 +01:00
|
|
|
final Tx target;
|
2015-01-01 23:17:32 +01:00
|
|
|
|
2020-11-28 14:08:34 +01:00
|
|
|
final RelationType relationType;
|
2015-01-01 23:17:32 +01:00
|
|
|
|
2015-01-06 17:14:16 +01:00
|
|
|
public TxRelation(RelationType relationType, Tx source, Tx 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
|
2015-01-06 17:14:16 +01:00
|
|
|
public ITx getSource() {
|
2015-01-01 23:17:32 +01:00
|
|
|
return source;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-01-06 17:14:16 +01:00
|
|
|
public ITx getTarget() {
|
2015-01-01 23:17:32 +01:00
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|