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.String
SYNCABLE_TYPE_VALUE
Fields 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 long
getDate()
Deprecated.use getDateInt()int
getDateInt()
int
getNewShares()
int
getOldShares()
double
getSplitRatio()
java.lang.String
getSyncItemType()
Subclasses should override this to return a static string identifying their type of objectvoid
itemWasUpdated()
This is called after an item is updated by calling itemWasUpdated(SyncRecord).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 datevoid
setDate(long date)
void
setDateInt(int date)
void
setNewShares(int newShares)
void
setOldShares(int oldShares)
void
setSplitRatio(double newRatio)
void
setSplitRatio(int oldShares, int newShares)
java.lang.String
toString()
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:MoneydanceSyncableItem
Subclasses should override this to return a static string identifying their type of object- Specified by:
getSyncItemType
in interfacecom.infinitekind.tiksync.SyncableItem
- Overrides:
getSyncItemType
in classMoneydanceSyncableItem
-
itemWasUpdated
public void itemWasUpdated()Description copied from class:MoneydanceSyncableItem
This 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:
itemWasUpdated
in 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:
toString
in 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
-