SCViewer/plugins/com.minres.scviewer.databas.../src/com/minres/scviewer/database/text/TxRelation.java

36 lines
664 B
Java
Raw Normal View History

2020-11-28 14:08:34 +01:00
package com.minres.scviewer.database.text;
2015-01-01 23:17:32 +01:00
import com.minres.scviewer.database.RelationType;
2020-11-28 14:47:43 +01:00
import com.minres.scviewer.database.tx.ITx;
import com.minres.scviewer.database.tx.ITxRelation;
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;
}
}