|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjgnash.engine.StoredObject
jgnash.engine.Transaction
jgnash.engine.InvestmentTransaction
public class InvestmentTransaction
Class for investment transactions.
All TransactionEntry(s) must be of the same security
| Field Summary | |
|---|---|
private static long |
serialVersionUID
|
| Fields inherited from class jgnash.engine.Transaction |
|---|
transactionEntries |
| Constructor Summary | |
|---|---|
InvestmentTransaction()
|
|
| Method Summary | |
|---|---|
void |
addTransactionEntry(TransactionEntry entry)
Returns the balance of the transaction amount with respect to the supplied account. |
java.math.BigDecimal |
getFees()
Sum transaction fees |
(package private) java.math.BigDecimal |
getFees(Account account)
Sum transaction fees |
Account |
getInvestmentAccount()
|
java.util.List<TransactionEntry> |
getInvestmentFeeEntries()
Get a list of transaction entries tagged as investment fees |
java.util.List<TransactionEntry> |
getInvestmentGainLossEntries()
Get a list of transaction entries tagged as gains and loss |
java.math.BigDecimal |
getMarketValue(java.math.BigDecimal sharePrice)
Return the market value of the transaction based on the supplied share price |
java.math.BigDecimal |
getMarketValue(java.util.Date date)
Return the market value of the transaction based on the latest share price |
java.math.BigDecimal |
getPrice()
Returns the price per share |
java.math.BigDecimal |
getQuantity()
Returns the number of shares assigned to this transaction. |
SecurityNode |
getSecurityNode()
|
(package private) java.math.BigDecimal |
getSignedQuantity()
Returns the number of shares assigned to this transaction. |
java.math.BigDecimal |
getTotal(Account account)
Calculates the total of the value of the shares, gains, fees, etc. |
TransactionType |
getTransactionType()
|
| Methods inherited from class jgnash.engine.Transaction |
|---|
addTransactionEntries, clone, compareTo, equalsIgnoreDate, getAccounts, getAmount, getCommonAccount, getDate, getDateEntered, getFitid, getLock, getMemo, getNumber, getPayee, getReconciled, getTransactionEntries, getTransactionEntriesByTag, readResolve, removeTransactionEntry, setDate, setDateEntered, setFitid, setMemo, setNumber, setPayee, setReconciled, setReconciled, size, toString |
| Methods inherited from class jgnash.engine.StoredObject |
|---|
equals, getUuid, hashCode, isMarkedForRemoval, setMarkedForRemoval |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
| Constructor Detail |
|---|
public InvestmentTransaction()
| Method Detail |
|---|
public TransactionType getTransactionType()
getTransactionType in class Transactionpublic Account getInvestmentAccount()
public void addTransactionEntry(TransactionEntry entry)
Transaction
addTransactionEntry in class Transactionentry - new TransactionEntry to addTransactionEntrypublic java.math.BigDecimal getPrice()
public java.math.BigDecimal getQuantity()
getSignedQuantity()java.math.BigDecimal getSignedQuantity()
getSignedQuantity()public SecurityNode getSecurityNode()
public java.math.BigDecimal getFees()
java.math.BigDecimal getFees(Account account)
account - account to calculate fees against
public java.util.List<TransactionEntry> getInvestmentFeeEntries()
TransactionTag.INVESTMENT_FEEpublic java.util.List<TransactionEntry> getInvestmentGainLossEntries()
TransactionTag.GAIN_LOSSpublic java.math.BigDecimal getMarketValue(java.math.BigDecimal sharePrice)
sharePrice - share price
public java.math.BigDecimal getMarketValue(java.util.Date date)
date - Date to base market value against
public java.math.BigDecimal getTotal(Account account)
Not intended for use to calculate account balances
account - The Account to calculate the total against
AbstractInvestmentTransactionEntry.getTotal()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||