com.moneydance.apps.md.model
Class Reminder

java.lang.Object
  extended by com.moneydance.apps.md.model.Reminder
Direct Known Subclasses:
BasicReminder, TransactionReminder

public abstract class Reminder
extends java.lang.Object

Basic superclass of all types of reminders - items that can be scheduled to occur on a specific date or recurring series of dates.

Author:
Sean D. Reilly

Field Summary
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 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
           
 
Constructor Summary
Reminder(long id, java.lang.String description, int initialDate, int dateAcked, int lastDate, int[] daysOfWeek, int daysOfWeekModifier, int[] daysOfMonth, int everyNDays, boolean everyYear)
           
 
Method Summary
 long getDateAcknowledged()
          Deprecated. use getAcknowledgedInt() instead
 int getDateAcknowledgedInt()
          Get the last date that this reminder was acknowledged/accepted.
 java.lang.String getDescription()
           
 long getId()
           
 long getInitialDate()
          Deprecated. use getInitialDateInt() instead
 int getInitialDateInt()
          Get the first date that the reminder will occur.
 long getLastDate()
          Deprecated. use getLastDateInt() instead
 int getLastDateInt()
          Set a date after which this reminder should no longer occur.
 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.Vector 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.
abstract  int getReminderType()
           
 int getRepeatDaily()
           
 int[] getRepeatMonthly()
           
 int getRepeatMonthlyModifier()
           
 int[] getRepeatWeeklyDays()
           
 int getRepeatWeeklyModifier()
           
 boolean getRepeatYearly()
           
 TagSet getTags()
           
 boolean hasBeenAcknowledged(java.util.Date asOfDate)
          Deprecated. use hasBeenAcknowledgedInt(int) instead
 boolean hasBeenAcknowledgedInt(int asOfDate)
          Returns true if this reminder has been acknowledged as of the given date.
 boolean isDirty()
           
 boolean occursOnDate(java.util.Calendar cal)
           
 void resetDirty()
           
 void setAcknowledged(java.util.Date date)
          Deprecated. use setAcknowledgedInt(int) instead
 void setAcknowledgedInt(int date)
          Set the last date that this reminder was acknowledged/accepted.
 void setDescription(java.lang.String description)
           
 void setDirty()
           
 void setId(long id)
           
 void setInitialDate(long date)
          Deprecated. use setInitialDateInt(int) instead
 void setInitialDateInt(int date)
          Set the first date that the reminder will occur.
 void setLastDate(long date)
          Deprecated. use setLastDateInt() instead
 void setLastDateInt(int date)
          Set a date after which this reminder should no longer occur.
 void setRepeatDaily(int everyNDays)
           
 void setRepeatMonthly(int daysOfMonthModifier, int[] daysOfMonth)
           
 void setRepeatWeekly(int daysOfWeekModifier, int[] daysOfWeek)
           
 void setRepeatYearly(boolean yearly)
           
 void setTags(TagSet newTags)
          Set the TagSet associated with this object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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 Detail

Reminder

public Reminder(long id,
                java.lang.String description,
                int initialDate,
                int dateAcked,
                int lastDate,
                int[] daysOfWeek,
                int daysOfWeekModifier,
                int[] daysOfMonth,
                int everyNDays,
                boolean everyYear)
Method Detail

getReminderType

public abstract int getReminderType()

resetDirty

public void resetDirty()

setDirty

public void setDirty()

isDirty

public boolean isDirty()

getId

public long getId()

setId

public void setId(long id)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

getInitialDate

public long getInitialDate()
Deprecated. use getInitialDateInt() instead

Get the first date that the reminder will occur.


setInitialDate

public void setInitialDate(long date)
Deprecated. use setInitialDateInt(int) instead

Set the first date that the reminder will occur


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.


getLastDate

public long getLastDate()
Deprecated. use getLastDateInt() instead


setLastDate

public void setLastDate(long date)
Deprecated. use setLastDateInt() instead


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.


getDateAcknowledged

public long getDateAcknowledged()
Deprecated. use getAcknowledgedInt() instead


setAcknowledged

public void setAcknowledged(java.util.Date date)
Deprecated. use setAcknowledgedInt(int) instead


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)

getPastDueDates

public java.util.Vector 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 TagSet getTags()

setTags

public void setTags(TagSet newTags)
Set the TagSet associated with this object. This should only be called when initially constructing this object.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object