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 class
Reminder.Type
-
Field Summary
Fields Modifier and Type Field Description static int
BASIC_REMINDER_TYPE
static int
LAST_DAY_OF_MONTH
static int
MONTHLY_EVERY
static int
MONTHLY_EVERY_FOURTH
static int
MONTHLY_EVERY_OTHER
static int
MONTHLY_EVERY_SIXTH
static int
MONTHLY_EVERY_THIRD
static int
REPEAT_BY_DAY_OF_MONTH
static int
REPEAT_BY_DAY_OF_WEEK
static int
REPEAT_BY_EVERY_YEAR
static int
REPEAT_BY_NDAYS
static int
REPEAT_BY_NONE
static java.lang.String
SYNCABLE_TYPE_VALUE
static int
TXN_REMINDER_TYPE
static int
WEEKLY_EVERY
static int
WEEKLY_EVERY_FIFTH
static int
WEEKLY_EVERY_FIRST
static int
WEEKLY_EVERY_FOURTH
static int
WEEKLY_EVERY_LAST
static int
WEEKLY_EVERY_SECOND
static int
WEEKLY_EVERY_THIRD
Fields 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 int
getAutoCommitDays()
Return the number of days prior to this transactions scheduled date that we should automatically add it to the transaction set.int
getDateAcknowledgedInt()
Get the last date that this reminder was acknowledged/accepted.java.lang.String
getDescription()
long
getId()
int
getInitialDateInt()
Get the first date that the reminder will occur.int
getLastDateInt()
Set a date after which this reminder should no longer occur.java.lang.String
getMemo()
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.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.RateAdjustmentOption
getRateAdjustmentOption()
Reminder.Type
getReminderType()
int
getRepeatDaily()
int[]
getRepeatMonthly()
int
getRepeatMonthlyModifier()
int[]
getRepeatWeeklyDays()
int
getRepeatWeeklyModifier()
boolean
getRepeatYearly()
java.lang.String
getSyncItemType()
Subclasses should override this to return a static string identifying their type of objectcom.infinitekind.tiksync.SyncRecord
getTags()
ParentTxn
getTransaction()
boolean
hasBeenAcknowledged(java.util.Date asOfDate)
Deprecated.use hasBeenAcknowledgedInt(int) insteadboolean
hasBeenAcknowledgedInt(int asOfDate)
Returns true if this reminder has been acknowledged as of the given date.boolean
isLoanReminder()
protected void
itemWasUpdated()
This is called after an item is updated by calling itemWasUpdated(SyncRecord).protected void
itemWillSync()
This is called just before an item will be stored and/or synced when itemWillSync(SyncRecord) is called.boolean
occursOnDate(java.util.Calendar cal)
void
setAcknowledgedInt(int date)
Set the last date that this reminder was acknowledged/accepted.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.void
setDescription(java.lang.String description)
void
setId(long id)
void
setInitialDateInt(int date)
Set the first date that the reminder will occur.void
setLastDateInt(int date)
Set a date after which this reminder should no longer occur.void
setLoan(boolean loan)
void
setMemo(java.lang.String memo)
void
setRateAdjustmentOption(RateAdjustmentOption rateAdjustmentOption)
void
setReminderType(Reminder.Type newReminderType)
void
setRepeatDaily(int everyNDays)
void
setRepeatMonthly(int daysOfMonthModifier, int[] daysOfMonth)
void
setRepeatWeekly(int daysOfWeekModifier, int[] daysOfWeek)
void
setRepeatYearly(boolean yearly)
void
setTransaction(ParentTxn ptxn)
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, 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: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
-
itemWillSync
protected void itemWillSync()Description copied from class:MoneydanceSyncableItem
This 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:
itemWillSync
in classMoneydanceSyncableItem
-
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
-
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:
toString
in classjava.lang.Object
-