|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.homeunix.thecave.buddi.model.impl.ModelFactory
public class ModelFactory
The factory for all model objects. It is highly recommended to use this class instead of the constructors, for all model objects.
| Field Summary | |
|---|---|
static java.util.Map<java.lang.String,BudgetCategoryType> |
budgetPeriodTypes
|
| Constructor Summary | |
|---|---|
ModelFactory()
|
|
| Method Summary | |
|---|---|
static Account |
createAccount(java.lang.String name,
AccountType type)
Creates a new Account with the given values |
static AccountType |
createAccountType(java.lang.String name,
boolean credit)
Creates a new AccountType with the given values |
static BudgetCategory |
createBudgetCategory(java.lang.String name,
BudgetCategoryType type,
boolean income)
Creates a new BudgetCategory with the given values |
static Document |
createDocument()
Creates a new data model, with some default types and categories. |
static Document |
createDocument(java.io.File file)
Attempts to load a data model from file. |
static ScheduledTransaction |
createScheduledTransaction(java.lang.String name,
java.lang.String message,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String frequencyType,
int scheduleDay,
int scheduleWeek,
int scheduleMonth,
java.lang.String description,
long amount,
Source from,
Source to)
Creates a new ScheduledTransaction with the given values |
static Transaction |
createTransaction(java.util.Date date,
java.lang.String description,
long amount,
Source from,
Source to)
Creates a new Transaction with the given values |
static java.io.File |
getAutoSaveLocation(java.io.File baseFile)
Returns the auto save file locaton for the given base file. |
static BudgetCategoryType |
getBudgetCategoryType(BudgetCategoryTypes type)
Returns the budget category type of the given type, or null if it does not exist. |
static BudgetCategoryType |
getBudgetCategoryType(java.lang.String name)
Returns the budget category type of the given name, or null if it does not exist. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.util.Map<java.lang.String,BudgetCategoryType> budgetPeriodTypes
| Constructor Detail |
|---|
public ModelFactory()
| Method Detail |
|---|
public static BudgetCategoryType getBudgetCategoryType(BudgetCategoryTypes type)
name -
public static BudgetCategoryType getBudgetCategoryType(java.lang.String name)
name -
public static Account createAccount(java.lang.String name,
AccountType type)
throws InvalidValueException
name - type -
InvalidValueException
public static AccountType createAccountType(java.lang.String name,
boolean credit)
throws InvalidValueException
name - credit -
InvalidValueException
public static BudgetCategory createBudgetCategory(java.lang.String name,
BudgetCategoryType type,
boolean income)
throws InvalidValueException
name - type - income -
InvalidValueException
public static Document createDocument()
throws ModelException
ModelException
public static Document createDocument(java.io.File file)
throws DocumentLoadException,
OperationCancelledException
file - File to load
DocumentLoadException
OperationCancelledException
public static ScheduledTransaction createScheduledTransaction(java.lang.String name,
java.lang.String message,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String frequencyType,
int scheduleDay,
int scheduleWeek,
int scheduleMonth,
java.lang.String description,
long amount,
Source from,
Source to)
throws InvalidValueException
InvalidValueException
public static Transaction createTransaction(java.util.Date date,
java.lang.String description,
long amount,
Source from,
Source to)
throws InvalidValueException
date - description - amount - from - to -
InvalidValueExceptionpublic static java.io.File getAutoSaveLocation(java.io.File baseFile)
baseFile -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||