|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjgnash.engine.StoredObject
jgnash.engine.CommodityNode
jgnash.engine.SecurityNode
public class SecurityNode
Security Node
The last market price is cached to improve performance
| Field Summary | |
|---|---|
private QuoteSource |
cachedQuoteSource
|
private java.util.List<SecurityHistoryNode> |
historyNodes
|
private java.lang.String |
isin
Symbol for quote download. |
private java.util.concurrent.locks.ReadWriteLock |
lock
|
private java.lang.String |
quoteSource
The currency that security values are reported in |
private CurrencyNode |
reportedCurrency
|
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
SecurityNode()
|
|
SecurityNode(CurrencyNode node)
|
|
| Method Summary | |
|---|---|
(package private) boolean |
addHistoryNode(SecurityHistoryNode node)
|
java.lang.Object |
clone()
Return a clone of this security node Security history is not cloned |
protected SecurityHistoryNode |
getHistoryNode(java.util.Date date)
|
java.util.List<SecurityHistoryNode> |
getHistoryNodes()
Get a copy of SecurityHistoryNodes for this security |
java.lang.String |
getISIN()
|
private SecurityHistoryNode |
getLastHistoryNode()
|
private java.util.concurrent.locks.ReadWriteLock |
getLock()
|
(package private) java.math.BigDecimal |
getMarketPrice(java.util.Date date)
|
java.math.BigDecimal |
getMarketPrice(java.util.Date date,
CurrencyNode node)
Returns the latest market price exchanged to the specified currency |
java.lang.String |
getPrefix()
Prefix is deferred to the reported currency |
QuoteSource |
getQuoteSource()
Returns the quote download source |
CurrencyNode |
getReportedCurrencyNode()
Returns the CurrencyNode that security histories are reported in |
java.lang.String |
getSuffix()
Suffix is deferred to the reported currency |
protected java.lang.Object |
readResolve()
|
(package private) boolean |
removeHistoryNode(SecurityHistoryNode hNode)
|
void |
setISIN(java.lang.String isin)
|
void |
setPrefix(java.lang.String ignored)
|
void |
setQuoteSource(QuoteSource source)
Sets the quote download source |
void |
setReportedCurrencyNode(CurrencyNode node)
Set the CurrencyNode that security histories are reported in |
void |
setSuffix(java.lang.String ignored)
|
| Methods inherited from class jgnash.engine.CommodityNode |
|---|
compareTo, equals, getDescription, getScale, getSymbol, hashCode, matches, round, setDescription, setScale, setSymbol, toString |
| Methods inherited from class jgnash.engine.StoredObject |
|---|
getUuid, isMarkedForRemoval, setMarkedForRemoval |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private CurrencyNode reportedCurrency
private java.lang.String quoteSource
private transient QuoteSource cachedQuoteSource
private java.lang.String isin
private java.util.List<SecurityHistoryNode> historyNodes
private transient java.util.concurrent.locks.ReadWriteLock lock
| Constructor Detail |
|---|
public SecurityNode()
public SecurityNode(CurrencyNode node)
| Method Detail |
|---|
private java.util.concurrent.locks.ReadWriteLock getLock()
public java.lang.String getPrefix()
getPrefix in class CommodityNodepublic void setPrefix(java.lang.String ignored)
setPrefix in class CommodityNodepublic java.lang.String getSuffix()
getSuffix in class CommodityNodepublic void setSuffix(java.lang.String ignored)
setSuffix in class CommodityNodepublic QuoteSource getQuoteSource()
public void setQuoteSource(QuoteSource source)
source - QuoteSource to usepublic java.lang.String getISIN()
public void setISIN(java.lang.String isin)
public void setReportedCurrencyNode(CurrencyNode node)
node - reported CurrencyNodepublic CurrencyNode getReportedCurrencyNode()
boolean addHistoryNode(SecurityHistoryNode node)
boolean removeHistoryNode(SecurityHistoryNode hNode)
private SecurityHistoryNode getLastHistoryNode()
public java.util.List<SecurityHistoryNode> getHistoryNodes()
protected SecurityHistoryNode getHistoryNode(java.util.Date date)
java.math.BigDecimal getMarketPrice(java.util.Date date)
public java.math.BigDecimal getMarketPrice(java.util.Date date,
CurrencyNode node)
date - date to find closest matching rate without exceedingnode - currency to exchange to
public java.lang.Object clone()
clone in class StoredObject
protected java.lang.Object readResolve()
throws java.io.ObjectStreamException
java.io.ObjectStreamException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||