org.homeunix.thecave.buddi.plugin.api.model
Interface ImmutableBudgetCategory

All Superinterfaces:
java.lang.Comparable<ImmutableModelObject>, ImmutableModelObject, ImmutableSource
All Known Subinterfaces:
MutableBudgetCategory
All Known Implementing Classes:
ImmutableBudgetCategoryImpl, MutableBudgetCategoryImpl

public interface ImmutableBudgetCategory
extends ImmutableSource


Method Summary
 java.util.List<ImmutableBudgetCategory> getAllImmutableChildren()
          Returns all children of this budget category, regardless of delete flag state.
 long getAmount(java.util.Date date)
          Returns the budgeted amount for the given date.
 long getAmount(java.util.Date startDate, java.util.Date endDate)
          Returns the budgeted amount spread across the date range.
 BudgetCategory getBudgetCategory()
          Returns the wrapped object from the underlying data model.
 java.util.List<java.util.Date> getBudgetedDates()
          Returns a list of all dates for this budget period which have budget information set for them.
 ImmutableBudgetCategoryType getBudgetPeriodType()
          Returns the budget period type associated with this budget category.
 java.util.List<ImmutableBudgetCategory> getImmutableChildren()
          Returns all visible children of this budget category.
 ImmutableBudgetCategory getParent()
          Returns the parent of this ImmutableBudgetCategory, or null if there is no parent.
 boolean isIncome()
          Does this ImmutableBudgetCategory represent an income category?
 
Methods inherited from interface org.homeunix.thecave.buddi.plugin.api.model.ImmutableSource
getFullName, getName, getNotes, getSource, isDeleted
 
Methods inherited from interface org.homeunix.thecave.buddi.plugin.api.model.ImmutableModelObject
getModified, getRaw, getUid
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getAmount

long getAmount(java.util.Date date)
Returns the budgeted amount for the given date.

Parameters:
date -
Returns:

getAmount

long getAmount(java.util.Date startDate,
               java.util.Date endDate)
Returns the budgeted amount spread across the date range. For instance, given a monthly budget period, and the date range Sept 15 - Sept 30, and September had a value of 100 for the given budget category, we would return 50.

Parameters:
startDate -
endDate -
Returns:

getBudgetCategory

BudgetCategory getBudgetCategory()
Returns the wrapped object from the underlying data model. By accessing this method, you bypass all protection which the Buddi API gives you; it is not recommended to use this method unless you understand the risks associated with it.

Returns:

getImmutableChildren

java.util.List<ImmutableBudgetCategory> getImmutableChildren()
Returns all visible children of this budget category. 'Visible Children' are defined to be all children which do not have the deleted flag set, plus all children which have the deleted flag set IIF the Preferences define that the user wants to see deleted sources. This method is mostly used for GUI functions, such as reports and graphs; if you want to access the model it is usually a better idea to use the getAllChildren() method, which will return all children regardless of delete flag state.

Returns:

getAllImmutableChildren

java.util.List<ImmutableBudgetCategory> getAllImmutableChildren()
Returns all children of this budget category, regardless of delete flag state.

Returns:

getBudgetPeriodType

ImmutableBudgetCategoryType getBudgetPeriodType()
Returns the budget period type associated with this budget category.

Returns:

getParent

ImmutableBudgetCategory getParent()
Returns the parent of this ImmutableBudgetCategory, or null if there is no parent.

Returns:

isIncome

boolean isIncome()
Does this ImmutableBudgetCategory represent an income category?

Returns:

getBudgetedDates

java.util.List<java.util.Date> getBudgetedDates()
Returns a list of all dates for this budget period which have budget information set for them. Any date for this budget period which has an associated amount of anything other than zero will be returned here.

Returns: