2020-11-28 14:08:34 +01:00
|
|
|
package com.minres.scviewer.database.text;
|
2015-01-01 23:17:32 +01:00
|
|
|
|
2021-01-02 16:15:27 +01:00
|
|
|
import java.io.Serializable;
|
|
|
|
|
2015-01-03 16:34: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
|
|
|
|
2021-01-02 16:15:27 +01:00
|
|
|
class TxRelation implements ITxRelation, Serializable {
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = -347668857680574140L;
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|