Class CurrencySplit
java.lang.Object
com.infinitekind.moneydance.model.MoneydanceSyncableItem
com.infinitekind.moneydance.model.CurrencySplit
- All Implemented Interfaces:
com.infinitekind.tiksync.SyncableItem
public final class CurrencySplit extends MoneydanceSyncableItem
Created by sreilly - 03/08/2014 07:46
-
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 CurrencySplit(AccountBook book) -
Method Summary
Modifier and Type Method Description longgetDate()Deprecated.use getDateInt()intgetDateInt()intgetNewShares()intgetOldShares()doublegetSplitRatio()java.lang.StringgetSyncItemType()Subclasses should override this to return a static string identifying their type of objectvoiditemWasUpdated()This is called after an item is updated by calling itemWasUpdated(SyncRecord).static CurrencySplitmakeSplit(AccountBook book, CurrencyType currency, int date, double splitRatio, int oldShares, int newShares)Create a stock split with the given ratio (which should match the old/new shares) on the given datevoidsetDate(long date)voidsetDateInt(int date)voidsetNewShares(int newShares)voidsetOldShares(int oldShares)voidsetSplitRatio(double newRatio)voidsetSplitRatio(int oldShares, int newShares)java.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, 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
-
getSplitRatio
public final double getSplitRatio() -
getDate
public final long getDate()Deprecated.use getDateInt() -
getDateInt
public final int getDateInt() -
getOldShares
public final int getOldShares() -
getNewShares
public final int getNewShares() -
setDate
public final void setDate(long date) -
setDateInt
public final void setDateInt(int date) -
setSplitRatio
public final void setSplitRatio(double newRatio) -
setSplitRatio
public final void setSplitRatio(int oldShares, int newShares) -
setOldShares
public final void setOldShares(int oldShares) -
setNewShares
public final void setNewShares(int newShares) -
toString
public final java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
makeSplit
public static CurrencySplit makeSplit(AccountBook book, CurrencyType currency, int date, double splitRatio, int oldShares, int newShares)Create a stock split with the given ratio (which should match the old/new shares) on the given date
-