Class CurrencySnapshot
java.lang.Object
com.infinitekind.moneydance.model.MoneydanceSyncableItem
com.infinitekind.moneydance.model.CurrencySnapshot
- All Implemented Interfaces:
com.infinitekind.tiksync.SyncableItem
public final class CurrencySnapshot extends MoneydanceSyncableItem
Created by sreilly - 03/08/2014 07:31
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSYNCABLE_TYPE_VALUEFields inherited from class com.infinitekind.moneydance.model.MoneydanceSyncableItem
book, info, SECURITY_SUBTYPES_ITEM_TYPE -
Constructor Summary
Constructors Constructor Description CurrencySnapshot(AccountBook book) -
Method Summary
Modifier and Type Method Description doublegetBaseRate()Deprecated.please use getRate(baseCurrency, date)doublegetDailyHigh()Get the highest rate recorded on the date of this snapshot in terms of this currency's relative base.doublegetDailyHigh(CurrencyType relativeCurrency)Get the highest rate recorded on the date of this snapshot in terms of the given currency.doublegetDailyLow()Get the lowest rate recorded on the date of this snapshot in terms of this currency's relative base.doublegetDailyLow(CurrencyType relativeCurrency)Get the lowest rate recorded on the date of this snapshot in terms of the given currency.longgetDailyVolume()Get the daily volume for this currency (used only for securities)longgetDate()Deprecated.use getDateInt() insteadintgetDateInt()Get the date for this snapshotdoublegetRate()Get the rate recorded on the date of this snapshot in terms of this currency's relative base.doublegetRate(CurrencyType relativeToCurrency)Deprecated.please use CurrencyType.getRate(CurrencyType, int) to get a historical price relative to another currencydoublegetRawRate()Deprecated.please don't use 'raw' rates anymore.java.lang.StringgetSyncItemType()Subclasses should override this to return a static string identifying their type of objectdoublegetUserDailyHigh()Deprecated.Please use the getDailyHigh() methoddoublegetUserDailyLow()Deprecated.Please use the getDailyLow() methoddoublegetUserRate()Deprecated.please use getRate() or getRate(CurrencyType) to get the rate relative to this currency's base or another currencyvoiditemWasUpdated()This is called after an item is updated by calling itemWasUpdated(SyncRecord).protected voiditemWillSync()This is called just before an item will be stored and/or synced when itemWillSync(SyncRecord) is called.voidsetBaseRate(double rate)Set the price of this snapshot's currency on the snapshot's date relative to the file's base currency.voidsetDailyHigh(double newUserHigh)Sets the daily ihgh price for this snapshot relative to this currency's relative base, or if there is no relative base, the account book's base currency.voidsetDailyHigh(double newUserHigh, CurrencyType relativeToCurrency)Sets the daily high price for this snapshot relative to the given currency, or the file's base currency if relativeToCurrency is nullvoidsetDailyLow(double newUserLow)Sets the daily low price for this snapshot relative to this currency's relative base, or if there is no relative base, the account book's base currency.voidsetDailyLow(double newUserLow, CurrencyType relativeToCurrency)Sets the daily low price for this snapshot relative to the given currency, or the file's base currency if relativeToCurrency is nullvoidsetDailyVolume(long newVolume)voidsetDate(long newDate)Deprecated.please use setDateInt(YYYYMMDD), since the time of day is strippedvoidsetDateInt(int date)voidsetRate(double rate)Set the price of this snapshot's currency on the snapshot's date relative to the currency's relative rate.voidsetRate(double rate, CurrencyType relativeCurrency)Set the price of this snapshot's currency on the snapshot's date relative to the given currency.voidsetRawRate(double rt)Deprecated.Do not use the raw rates anymorevoidsetUserDailyHigh(double newUserHigh)Deprecated.Please use one of the setDailyHigh() methodsvoidsetUserDailyLow(double newUserLow)Deprecated.Please use one of the setDailyLow() methodsvoidsetUserRate(double rate)Deprecated.please use setRate(double, CurrencyType) to set the ratejava.lang.StringtoString()Methods inherited from class com.infinitekind.moneydance.model.MoneydanceSyncableItem
addParameters, addTags, autoSyncsChanges, decodeKeywordList, deleteItem, doesParameterExist, duplicate, encodeKeywordList, equals, getAccountParameter, getAddress, getAddressParameter, getBook, getBooleanParameter, getCurrencyParameter, getCurrencyParameter, getCurrencyParameter, getDoubleParameter, getIntParameter, getKeywords, getLongParameter, getOriginalItem, getParameter, getParameter, getParameterCount, getParameterKeys, getPreference, getPreferenceBoolean, getPreferenceDouble, getPreferenceInt, getPreferenceIntArray, getPreferenceLong, getPreferenceStringList, getPreferenceSublist, getPreferenceSubset, getStringListParameter, getSyncInfo, getSyncTimestamp, getUUID, hasBeenSynced, hashCode, hasKeywordSubstring, initialize, isInEditingMode, isSyncable, itemWasUpdated, itemWillSync, makeSyncableItem, removeParameter, setAccountParameter, setAddress, setAddressParameter, setCurrencyParameter, setCurrencyParameter, setCurrencyParameter, setDirty, setEditingMode, setKeywords, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameterNoNotify, setPreference, setPreference, setPreference, syncItem
-
Field Details
-
SYNCABLE_TYPE_VALUE
public static final java.lang.String SYNCABLE_TYPE_VALUE- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
getSyncItemType
public final java.lang.String getSyncItemType()Description copied from class:MoneydanceSyncableItemSubclasses should override this to return a static string identifying their type of object- Specified by:
getSyncItemTypein interfacecom.infinitekind.tiksync.SyncableItem- Overrides:
getSyncItemTypein classMoneydanceSyncableItem
-
itemWasUpdated
public void itemWasUpdated()Description copied from class:MoneydanceSyncableItemThis is called after an item is updated by calling itemWasUpdated(SyncRecord). This can occur from the syncing process or from being loaded locally. Override this method to be notified.- Overrides:
itemWasUpdatedin classMoneydanceSyncableItem
-
itemWillSync
protected void itemWillSync()Description copied from class:MoneydanceSyncableItemThis is called just before an item will be stored and/or synced when itemWillSync(SyncRecord) is called. Override this method to be notified or if you'd like to store anything into the info record to be synced.- Overrides:
itemWillSyncin classMoneydanceSyncableItem
-
getDate
public final long getDate()Deprecated.use getDateInt() insteadGet the date for this snapshot -
getDateInt
public final int getDateInt()Get the date for this snapshot -
getUserRate
public final double getUserRate()Deprecated.please use getRate() or getRate(CurrencyType) to get the rate relative to this currency's base or another currencyGet the closing rate for the given day in a price relative to the base currency -
getRate
Deprecated.please use CurrencyType.getRate(CurrencyType, int) to get a historical price relative to another currencyGets the rate of this snapshot relative to the given currency or to the base currency if relativeCurrency is null.- Since:
- Moneydance 2019 (build 1800)
-
getRate
public final double getRate()Get the rate recorded on the date of this snapshot in terms of this currency's relative base. If the relative base is null then this returns the rate in terms of the base currency.- Since:
- Moneydance 2018 (build 1800)
-
getBaseRate
public final double getBaseRate()Deprecated.please use getRate(baseCurrency, date)Gets the rate of this snapshot relative to the base currency.- Since:
- Moneydance 2018 (build 1800)
-
getRawRate
public final double getRawRate()Deprecated.please don't use 'raw' rates anymore.Get the rate used to compute values in different currencies -
getDailyVolume
public final long getDailyVolume()Get the daily volume for this currency (used only for securities) -
getUserDailyHigh
public final double getUserDailyHigh()Deprecated.Please use the getDailyHigh() methodGet the highest rate recorded on the date of this snapshot (used only for securities) -
getDailyHigh
Get the highest rate recorded on the date of this snapshot in terms of the given currency. If the given currency is null then this returns the rate relative to the data file's base currency.- Since:
- Moneydance 2018 (build 1800)
-
getDailyHigh
public final double getDailyHigh()Get the highest rate recorded on the date of this snapshot in terms of this currency's relative base. If the relative base is null then this returns the rate in terms of the base currency.- Since:
- Moneydance 2018 (build 1800)
-
getUserDailyLow
public final double getUserDailyLow()Deprecated.Please use the getDailyLow() methodGet the lowest rate recorded on the date of this snapshot (used only for securities) -
getDailyLow
Get the lowest rate recorded on the date of this snapshot in terms of the given currency. If the given currency is null then this returns the rate relative to the data file's base currency.- Since:
- Moneydance 2018 (build 1800)
-
getDailyLow
public final double getDailyLow()Get the lowest rate recorded on the date of this snapshot in terms of this currency's relative base. If the relative base is null then this returns the rate in terms of the base currency.- Since:
- Moneydance 2018 (build 1800)
-
setDate
public final void setDate(long newDate)Deprecated.please use setDateInt(YYYYMMDD), since the time of day is strippedSet the date of this snapshot in terms of milliseconds since 1970.01.01 0:00:00.000 GMT -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
setDateInt
public final void setDateInt(int date) -
setRate
Set the price of this snapshot's currency on the snapshot's date relative to the given currency. If relativeCurrency is null then this assumes the price is relative to the file's base currency.- Since:
- Moneydance 2018 (build 1800)
-
setRate
public void setRate(double rate)Set the price of this snapshot's currency on the snapshot's date relative to the currency's relative rate.- Since:
- Moneydance 2018 (build 1800)
-
setBaseRate
public void setBaseRate(double rate)Set the price of this snapshot's currency on the snapshot's date relative to the file's base currency.- Since:
- Moneydance 2018 (build 1800)
-
setUserRate
public void setUserRate(double rate)Deprecated.please use setRate(double, CurrencyType) to set the rateSet the closing rate for the given day in a price relative to the base currency -
setRawRate
public final void setRawRate(double rt)Deprecated.Do not use the raw rates anymoreSets the rate or price for this snapshot using the "raw" rate. -
setDailyVolume
public final void setDailyVolume(long newVolume) -
setUserDailyLow
public final void setUserDailyLow(double newUserLow)Deprecated.Please use one of the setDailyLow() methodsSets the daily low price for this snapshot relative to the base currency -
setDailyLow
public final void setDailyLow(double newUserLow)Sets the daily low price for this snapshot relative to this currency's relative base, or if there is no relative base, the account book's base currency.- Since:
- Moneydance 2018 (build 1800)
-
setDailyLow
Sets the daily low price for this snapshot relative to the given currency, or the file's base currency if relativeToCurrency is null- Since:
- Moneydance 2018 (build 1800)
-
setUserDailyHigh
public final void setUserDailyHigh(double newUserHigh)Deprecated.Please use one of the setDailyHigh() methodsSets the daily high price for this snapshot relative to the base currency -
setDailyHigh
public final void setDailyHigh(double newUserHigh)Sets the daily ihgh price for this snapshot relative to this currency's relative base, or if there is no relative base, the account book's base currency.- Since:
- Moneydance 2018 (build 1800)
-
setDailyHigh
Sets the daily high price for this snapshot relative to the given currency, or the file's base currency if relativeToCurrency is null- Since:
- Moneydance 2018 (build 1800)
-