2015-01-03 16:34:32 +01:00
|
|
|
package com.minres.scviewer.database.sqlite;
|
|
|
|
|
|
|
|
import com.minres.scviewer.database.AssociationType;
|
|
|
|
import com.minres.scviewer.database.DataType;
|
2015-01-06 17:14:16 +01:00
|
|
|
import com.minres.scviewer.database.ITxAttribute;
|
2015-01-03 16:34:32 +01:00
|
|
|
import com.minres.scviewer.database.sqlite.tables.ScvTxAttribute;
|
|
|
|
|
2015-01-06 17:14:16 +01:00
|
|
|
public class TxAttribute implements ITxAttribute{
|
2015-01-03 16:34:32 +01:00
|
|
|
|
2015-01-06 17:14:16 +01:00
|
|
|
Tx trTransaction;
|
2015-01-03 16:34:32 +01:00
|
|
|
ScvTxAttribute scvAttribute;
|
|
|
|
|
2015-01-06 17:14:16 +01:00
|
|
|
public TxAttribute(Tx trTransaction, ScvTxAttribute scvAttribute) {
|
2015-01-03 16:34:32 +01:00
|
|
|
this.trTransaction=trTransaction;
|
|
|
|
this.scvAttribute=scvAttribute;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getName() {
|
|
|
|
return scvAttribute.getName();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public DataType getDataType() {
|
|
|
|
return DataType.values()[scvAttribute.getData_type()];
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public AssociationType getType() {
|
|
|
|
return AssociationType.values()[scvAttribute.getType()];
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Object getValue() {
|
|
|
|
return scvAttribute.getData_value();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|