Class Reminder
java.lang.Object
com.infinitekind.moneydance.model.MoneydanceSyncableItem
com.infinitekind.moneydance.model.Reminder
- All Implemented Interfaces:
com.infinitekind.tiksync.SyncableItem
public class Reminder extends MoneydanceSyncableItem
Reminder represents an item (usually a note or transaction) that can be scheduled
to occur on a specific date or recurring series of dates.
- Author:
- Sean D. Reilly
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReminder.Type -
Field Summary
Fields Modifier and Type Field Description static intBASIC_REMINDER_TYPEstatic intLAST_DAY_OF_MONTHstatic intMONTHLY_EVERYstatic intMONTHLY_EVERY_FOURTHstatic intMONTHLY_EVERY_OTHERstatic intMONTHLY_EVERY_SIXTHstatic intMONTHLY_EVERY_THIRDstatic intREPEAT_BY_DAY_OF_MONTHstatic intREPEAT_BY_DAY_OF_WEEKstatic intREPEAT_BY_EVERY_YEARstatic intREPEAT_BY_NDAYSstatic intREPEAT_BY_NONEstatic java.lang.StringSYNCABLE_TYPE_VALUEstatic intTXN_REMINDER_TYPEstatic intWEEKLY_EVERYstatic intWEEKLY_EVERY_FIFTHstatic intWEEKLY_EVERY_FIRSTstatic intWEEKLY_EVERY_FOURTHstatic intWEEKLY_EVERY_LASTstatic intWEEKLY_EVERY_SECONDstatic intWEEKLY_EVERY_THIRDFields inherited from class com.infinitekind.moneydance.model.MoneydanceSyncableItem
book, info, SECURITY_SUBTYPES_ITEM_TYPE -
Constructor Summary
Constructors Constructor Description Reminder(AccountBook book) -
Method Summary
Modifier and Type Method Description intgetAutoCommitDays()Return the number of days prior to this transactions scheduled date that we should automatically add it to the transaction set.intgetDateAcknowledgedInt()Get the last date that this reminder was acknowledged/accepted.java.lang.StringgetDescription()longgetId()intgetInitialDateInt()Get the first date that the reminder will occur.intgetLastDateInt()Set a date after which this reminder should no longer occur.java.lang.StringgetMemo()intgetNextOccurance(int maximumDate)Calculates the next date on which the reminder will occur (ie that is greater than the acknowledgement date) and that is equal to or below the given date.java.util.List<java.util.Date>getPastDueDates(java.util.Calendar today)Return a Vector containing a list off Date objects for which this Reminder has been scheduled but not yet acknowledged.RateAdjustmentOptiongetRateAdjustmentOption()Reminder.TypegetReminderType()intgetRepeatDaily()int[]getRepeatMonthly()intgetRepeatMonthlyModifier()int[]getRepeatWeeklyDays()intgetRepeatWeeklyModifier()booleangetRepeatYearly()java.lang.StringgetSyncItemType()Subclasses should override this to return a static string identifying their type of objectcom.infinitekind.tiksync.SyncRecordgetTags()ParentTxngetTransaction()booleanhasBeenAcknowledged(java.util.Date asOfDate)Deprecated.use hasBeenAcknowledgedInt(int) insteadbooleanhasBeenAcknowledgedInt(int asOfDate)Returns true if this reminder has been acknowledged as of the given date.booleanisLoanReminder()protected voiditemWasUpdated()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.booleanoccursOnDate(java.util.Calendar cal)voidsetAcknowledgedInt(int date)Set the last date that this reminder was acknowledged/accepted.voidsetAutoCommitDays(int autoCommitDays)Set the number of days prior to this transactions scheduled date that we should automatically add it to the transaction set.voidsetDescription(java.lang.String description)voidsetId(long id)voidsetInitialDateInt(int date)Set the first date that the reminder will occur.voidsetLastDateInt(int date)Set a date after which this reminder should no longer occur.voidsetLoan(boolean loan)voidsetMemo(java.lang.String memo)voidsetRateAdjustmentOption(RateAdjustmentOption rateAdjustmentOption)voidsetReminderType(Reminder.Type newReminderType)voidsetRepeatDaily(int everyNDays)voidsetRepeatMonthly(int daysOfMonthModifier, int[] daysOfMonth)voidsetRepeatWeekly(int daysOfWeekModifier, int[] daysOfWeek)voidsetRepeatYearly(boolean yearly)voidsetTransaction(ParentTxn ptxn)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, 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
-
TXN_REMINDER_TYPE
public static final int TXN_REMINDER_TYPE- See Also:
- Constant Field Values
-
BASIC_REMINDER_TYPE
public static final int BASIC_REMINDER_TYPE- See Also:
- Constant Field Values
-
REPEAT_BY_NONE
public static final int REPEAT_BY_NONE- See Also:
- Constant Field Values
-
REPEAT_BY_DAY_OF_WEEK
public static final int REPEAT_BY_DAY_OF_WEEK- See Also:
- Constant Field Values
-
REPEAT_BY_DAY_OF_MONTH
public static final int REPEAT_BY_DAY_OF_MONTH- See Also:
- Constant Field Values
-
REPEAT_BY_NDAYS
public static final int REPEAT_BY_NDAYS- See Also:
- Constant Field Values
-
REPEAT_BY_EVERY_YEAR
public static final int REPEAT_BY_EVERY_YEAR- See Also:
- Constant Field Values
-
MONTHLY_EVERY
public static final int MONTHLY_EVERY- See Also:
- Constant Field Values
-
MONTHLY_EVERY_OTHER
public static final int MONTHLY_EVERY_OTHER- See Also:
- Constant Field Values
-
MONTHLY_EVERY_THIRD
public static final int MONTHLY_EVERY_THIRD- See Also:
- Constant Field Values
-
MONTHLY_EVERY_FOURTH
public static final int MONTHLY_EVERY_FOURTH- See Also:
- Constant Field Values
-
MONTHLY_EVERY_SIXTH
public static final int MONTHLY_EVERY_SIXTH- See Also:
- Constant Field Values
-
WEEKLY_EVERY
public static final int WEEKLY_EVERY- See Also:
- Constant Field Values
-
WEEKLY_EVERY_FIRST
public static final int WEEKLY_EVERY_FIRST- See Also:
- Constant Field Values
-
WEEKLY_EVERY_SECOND
public static final int WEEKLY_EVERY_SECOND- See Also:
- Constant Field Values
-
WEEKLY_EVERY_THIRD
public static final int WEEKLY_EVERY_THIRD- See Also:
- Constant Field Values
-
WEEKLY_EVERY_FOURTH
public static final int WEEKLY_EVERY_FOURTH- See Also:
- Constant Field Values
-
WEEKLY_EVERY_FIFTH
public static final int WEEKLY_EVERY_FIFTH- See Also:
- Constant Field Values
-
WEEKLY_EVERY_LAST
public static final int WEEKLY_EVERY_LAST- See Also:
- Constant Field Values
-
LAST_DAY_OF_MONTH
public static final int LAST_DAY_OF_MONTH- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
itemWasUpdated
protected 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
-
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
-
getReminderType
-
setReminderType
-
getId
public long getId() -
setId
public void setId(long id) -
getDescription
public java.lang.String getDescription() -
setDescription
public void setDescription(java.lang.String description) -
getMemo
public java.lang.String getMemo() -
setMemo
public void setMemo(java.lang.String memo) -
getInitialDateInt
public int getInitialDateInt()Get the first date that the reminder will occur. The date should be an integer with decimal form YYYYMMDD. -
setInitialDateInt
public void setInitialDateInt(int date)Set the first date that the reminder will occur. The date should be an integer with decimal form YYYYMMDD. -
getLastDateInt
public int getLastDateInt()Set a date after which this reminder should no longer occur. The date should be an integer with decimal form YYYYMMDD. If the value of the date is zero, then there is no last date. -
setLastDateInt
public void setLastDateInt(int date)Set a date after which this reminder should no longer occur. The date should be an integer with decimal form YYYYMMDD If the value of the date is zero, then there is no last date. -
getDateAcknowledgedInt
public int getDateAcknowledgedInt()Get the last date that this reminder was acknowledged/accepted. The date should be an integer with decimal form YYYYMMDD -
setAcknowledgedInt
public void setAcknowledgedInt(int date)Set the last date that this reminder was acknowledged/accepted. The date should be an integer with decimal form YYYYMMDD -
getRepeatWeeklyModifier
public int getRepeatWeeklyModifier() -
getRepeatWeeklyDays
public int[] getRepeatWeeklyDays() -
setRepeatWeekly
public void setRepeatWeekly(int daysOfWeekModifier, int[] daysOfWeek) -
getRepeatMonthlyModifier
public int getRepeatMonthlyModifier() -
getRepeatMonthly
public int[] getRepeatMonthly() -
setRepeatMonthly
public void setRepeatMonthly(int daysOfMonthModifier, int[] daysOfMonth) -
getRepeatDaily
public int getRepeatDaily() -
setRepeatDaily
public void setRepeatDaily(int everyNDays) -
getRepeatYearly
public boolean getRepeatYearly() -
setRepeatYearly
public void setRepeatYearly(boolean yearly) -
getTransaction
-
setTransaction
-
getRateAdjustmentOption
-
setRateAdjustmentOption
-
getAutoCommitDays
public int getAutoCommitDays()Return the number of days prior to this transactions scheduled date that we should automatically add it to the transaction set. Returns -1 if the transaction should not auto-commit. -
setAutoCommitDays
public void setAutoCommitDays(int autoCommitDays)Set the number of days prior to this transactions scheduled date that we should automatically add it to the transaction set. Set to -1 (or any negative number) if the transaction should not auto-commit. -
isLoanReminder
public boolean isLoanReminder() -
setLoan
public void setLoan(boolean loan) -
getPastDueDates
public java.util.List<java.util.Date> getPastDueDates(java.util.Calendar today)Return a Vector containing a list off Date objects for which this Reminder has been scheduled but not yet acknowledged. -
hasBeenAcknowledged
public boolean hasBeenAcknowledged(java.util.Date asOfDate)Deprecated.use hasBeenAcknowledgedInt(int) instead -
hasBeenAcknowledgedInt
public boolean hasBeenAcknowledgedInt(int asOfDate)Returns true if this reminder has been acknowledged as of the given date. -
getNextOccurance
public int getNextOccurance(int maximumDate)Calculates the next date on which the reminder will occur (ie that is greater than the acknowledgement date) and that is equal to or below the given date. If there is no such date then this returns 0. Note: this can be an expensive operation- Returns:
-
occursOnDate
public boolean occursOnDate(java.util.Calendar cal) -
getTags
public com.infinitekind.tiksync.SyncRecord getTags() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-