package database.transaction; import com.j256.ormlite.field.DatabaseField; import com.j256.ormlite.table.DatabaseTable; import java.math.BigInteger; @DatabaseTable(tableName = "T_TRANSACTION") public class Transaction { @DatabaseField private int transactionId; @DatabaseField(canBeNull = false) private int userId; @DatabaseField(canBeNull = false) private long transactionDate; @DatabaseField(columnName = "transactionFrom", canBeNull = false) private String sourceAddress; @DatabaseField(columnName = "transactionTo", canBeNull = false) private String destAddress; @DatabaseField(canBeNull = false) private String transactionHash; @DatabaseField(canBeNull = false) private BigInteger amount; @DatabaseField(canBeNull = false) private String unit; public Transaction() { super(); } public Transaction(long transactionDate, String sourceAddress, String destAddress, String transactionHash, BigInteger amount, String unit) { super(); this.transactionDate = transactionDate; this.sourceAddress = sourceAddress; this.destAddress = destAddress; this.transactionHash = transactionHash; this.amount = amount; this.unit = unit; } public String getSourceAddress() { return sourceAddress; } public void setSourceAddress(String sourceAddress) { this.sourceAddress = sourceAddress; } public String getDestAddress() { return destAddress; } public void setDestAddress(String destAddress) { this.destAddress = destAddress; } public String getTransactionHash() { return transactionHash; } public void setTransactionHash(String transactionHash) { this.transactionHash = transactionHash; } public BigInteger getAmount() { return amount; } public void setAmount(BigInteger amount) { this.amount = amount; } public int getTransactionId() { return transactionId; } public void setTransactionId(int id) { this.transactionId = transactionId; } public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public long getTransactionDate() { return transactionDate; } public void setTransactionDate(long transactionDate) { this.transactionDate = transactionDate; } public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit; } }