#include <mymoneydatabasemgr.h>
Inheritance diagram for MyMoneyDatabaseMgr:


Public Member Functions | |
| MyMoneyDatabaseMgr () | |
| ~MyMoneyDatabaseMgr () | |
| virtual const MyMoneyPayee | user (void) const |
| virtual const QDate | creationDate (void) const |
| virtual const QDate | lastModificationDate (void) const |
| virtual unsigned int | currentFixVersion (void) const |
| virtual unsigned int | fileFixVersion (void) const |
| virtual void | setUser (const MyMoneyPayee &user) |
| virtual void | setFileFixVersion (const unsigned int v) |
| virtual void | setValue (const QCString &key, const QString &value) |
| virtual const QString | value (const QCString &key) const |
| virtual void | deletePair (const QCString &key) |
| virtual MyMoneyDatabaseMgr const * | duplicate (void) |
| virtual void | addAccount (MyMoneyAccount &account) |
| virtual void | addAccount (MyMoneyAccount &parent, MyMoneyAccount &account) |
| virtual void | addPayee (MyMoneyPayee &payee) |
| virtual const MyMoneyPayee | payee (const QCString &id) const |
| virtual const MyMoneyPayee | payeeByName (const QString &payee) const |
| virtual void | modifyPayee (const MyMoneyPayee &payee) |
| virtual void | removePayee (const MyMoneyPayee &payee) |
| virtual const QValueList< MyMoneyPayee > | payeeList (void) const |
| virtual const MyMoneyAccount | account (const QCString &id) const |
| virtual bool | isStandardAccount (const QCString &id) const |
| virtual void | setAccountName (const QCString &id, const QString &name) |
| virtual void | addInstitution (MyMoneyInstitution &institution) |
| virtual void | addTransaction (MyMoneyTransaction &transaction, const bool skipAccountUpdate=false) |
| virtual bool | hasActiveSplits (const QCString &id) const |
| virtual const MyMoneyMoney | balance (const QCString &id, const QDate &date) const |
| virtual const MyMoneyMoney | totalBalance (const QCString &id, const QDate &date) const |
| virtual const MyMoneyInstitution | institution (const QCString &id) const |
| virtual bool | dirty (void) const |
| virtual void | setDirty (void) |
| virtual unsigned int | accountCount (void) const |
| virtual const QValueList< MyMoneyInstitution > | institutionList (void) const |
| virtual void | modifyAccount (const MyMoneyAccount &account, const bool skipCheck=false) |
| virtual void | modifyInstitution (const MyMoneyInstitution &institution) |
| virtual void | modifyTransaction (const MyMoneyTransaction &transaction) |
| virtual void | reparentAccount (MyMoneyAccount &account, MyMoneyAccount &parent) |
| virtual void | removeTransaction (const MyMoneyTransaction &transaction) |
| virtual unsigned int | transactionCount (const QCString &account=QCString()) const |
| virtual const QMap< QCString, unsigned long > | transactionCountMap (void) const |
| virtual const QValueList< MyMoneyTransaction > | transactionList (MyMoneyTransactionFilter &filter) const |
| virtual void | transactionList (QValueList< MyMoneyTransaction > &list, MyMoneyTransactionFilter &filter) const |
| virtual void | transactionList (QValueList< QPair< MyMoneyTransaction, MyMoneySplit > > &list, MyMoneyTransactionFilter &filter) const |
| virtual void | removeAccount (const MyMoneyAccount &account) |
| virtual void | removeInstitution (const MyMoneyInstitution &institution) |
| virtual const MyMoneyTransaction | transaction (const QCString &id) const |
| virtual const MyMoneyTransaction | transaction (const QCString &account, const int idx) const |
| virtual unsigned int | institutionCount (void) const |
| virtual void | accountList (QValueList< MyMoneyAccount > &list) const |
| virtual const MyMoneyAccount | liability (void) const |
| virtual const MyMoneyAccount | asset (void) const |
| virtual const MyMoneyAccount | expense (void) const |
| virtual const MyMoneyAccount | income (void) const |
| virtual const MyMoneyAccount | equity (void) const |
| virtual void | addSecurity (MyMoneySecurity &security) |
| virtual void | modifySecurity (const MyMoneySecurity &security) |
| virtual void | removeSecurity (const MyMoneySecurity &security) |
| virtual const MyMoneySecurity | security (const QCString &id) const |
| virtual const QValueList< MyMoneySecurity > | securityList (void) const |
| virtual void | addPrice (const MyMoneyPrice &price) |
| virtual void | removePrice (const MyMoneyPrice &price) |
| virtual const MyMoneyPrice | price (const QCString &fromId, const QCString &toId, const QDate &date, const bool exactDate) const |
| virtual const MyMoneyPriceList | priceList (void) const |
| virtual void | addSchedule (MyMoneySchedule &sched) |
| virtual void | modifySchedule (const MyMoneySchedule &sched) |
| virtual void | removeSchedule (const MyMoneySchedule &sched) |
| virtual const MyMoneySchedule | schedule (const QCString &id) const |
| virtual const QValueList< MyMoneySchedule > | scheduleList (const QCString &accountId=QCString(), const MyMoneySchedule::typeE type=MyMoneySchedule::TYPE_ANY, const MyMoneySchedule::occurenceE occurence=MyMoneySchedule::OCCUR_ANY, const MyMoneySchedule::paymentTypeE paymentType=MyMoneySchedule::STYPE_ANY, const QDate &startDate=QDate(), const QDate &endDate=QDate(), const bool overdue=false) const |
| virtual const QValueList< MyMoneySchedule > | scheduleListEx (int scheduleTypes, int scheduleOcurrences, int schedulePaymentTypes, QDate startDate, const QCStringList &accounts=QCStringList()) const |
| virtual void | addCurrency (const MyMoneySecurity ¤cy) |
| virtual void | modifyCurrency (const MyMoneySecurity ¤cy) |
| virtual void | removeCurrency (const MyMoneySecurity ¤cy) |
| virtual const MyMoneySecurity | currency (const QCString &id) const |
| virtual const QValueList< MyMoneySecurity > | currencyList (void) const |
| virtual const QValueList< MyMoneyReport > | reportList (void) const |
| virtual void | addReport (MyMoneyReport &report) |
| virtual void | modifyReport (const MyMoneyReport &report) |
| virtual unsigned | countReports (void) const |
| virtual const MyMoneyReport | report (const QCString &id) const |
| virtual void | removeReport (const MyMoneyReport &report) |
| virtual const QValueList< MyMoneyBudget > | budgetList (void) const |
| virtual void | addBudget (MyMoneyBudget &budget) |
| virtual const MyMoneyBudget | budgetByName (const QString &budget) const |
| virtual void | modifyBudget (const MyMoneyBudget &budget) |
| virtual unsigned | countBudgets (void) const |
| virtual MyMoneyBudget | budget (const QCString &id) const |
| virtual void | removeBudget (const MyMoneyBudget &budget) |
| virtual void | clearCache (void) |
| virtual bool | isReferenced (const MyMoneyObject &obj, const MyMoneyFileBitArray &skipCheck=MyMoneyFileBitArray()) const |
| virtual void | close (void) |
| virtual void | startTransaction (void) |
| virtual bool | commitTransaction (void) |
| virtual void | rollbackTransaction (void) |
| virtual void | setCreationDate (const QDate &val) |
| virtual MyMoneyStorageSql * | connectToDatabase (const KURL &url) |
| virtual void | fillStorage () |
| virtual void | setLastModificationDate (const QDate &val) |
| virtual bool | isDuplicateTransaction (const QCString &) const |
| virtual void | loadAccounts (const QMap< QCString, MyMoneyAccount > &map) |
| virtual void | loadTransactions (const QMap< QCString, MyMoneyTransaction > &map) |
| virtual void | loadInstitutions (const QMap< QCString, MyMoneyInstitution > &map) |
| virtual void | loadPayees (const QMap< QCString, MyMoneyPayee > &map) |
| virtual void | loadSchedules (const QMap< QCString, MyMoneySchedule > &map) |
| virtual void | loadSecurities (const QMap< QCString, MyMoneySecurity > &map) |
| virtual void | loadCurrencies (const QMap< QCString, MyMoneySecurity > &map) |
| virtual void | loadReports (const QMap< QCString, MyMoneyReport > &reports) |
| virtual void | loadBudgets (const QMap< QCString, MyMoneyBudget > &budgets) |
| virtual void | loadPrices (const MyMoneyPriceList &list) |
| virtual unsigned long | accountId (void) const |
| virtual unsigned long | transactionId (void) const |
| virtual unsigned long | payeeId (void) const |
| virtual unsigned long | institutionId (void) const |
| virtual unsigned long | scheduleId (void) const |
| virtual unsigned long | securityId (void) const |
| virtual unsigned long | reportId (void) const |
| virtual unsigned long | budgetId (void) const |
| virtual void | loadAccountId (const unsigned long id) |
| virtual void | loadTransactionId (const unsigned long id) |
| virtual void | loadPayeeId (const unsigned long id) |
| virtual void | loadInstitutionId (const unsigned long id) |
| virtual void | loadScheduleId (const unsigned long id) |
| virtual void | loadSecurityId (const unsigned long id) |
| virtual void | loadReportId (const unsigned long id) |
| virtual void | loadBudgetId (const unsigned long id) |
| virtual const QMap< QCString, QString > | pairs (void) const |
| virtual void | setPairs (const QMap< QCString, QString > &list) |
| virtual void | rebuildAccountBalances (void) |
Private Member Functions | |
| const QCString | nextInstitutionID (void) |
| const QCString | nextAccountID (void) |
| const QCString | nextTransactionID (void) |
| const QCString | nextPayeeID (void) |
| const QCString | nextScheduleID (void) |
| const QCString | nextSecurityID (void) |
| const QCString | nextReportID (void) |
| const QCString | nextBudgetID (void) |
Private Attributes | |
| QDate | m_creationDate |
| unsigned int | m_currentFixVersion |
| unsigned int | m_fileFixVersion |
| QDate | m_lastModificationDate |
| KSharedPtr< MyMoneyStorageSql > | m_sql |
| MyMoneyPayee | m_user |
Static Private Attributes | |
| static const int | INSTITUTION_ID_SIZE = 6 |
| static const int | ACCOUNT_ID_SIZE = 6 |
| static const int | TRANSACTION_ID_SIZE = 18 |
| static const int | PAYEE_ID_SIZE = 6 |
| static const int | SCHEDULE_ID_SIZE = 6 |
| static const int | SECURITY_ID_SIZE = 6 |
| static const int | REPORT_ID_SIZE = 6 |
| static const int | BUDGET_ID_SIZE = 6 |
| static const int | CURRENT_FIX_VERSION = 3 |
The MyMoneyDatabaseMgr must have a MyMoneyStorageSql connected to a database to be useful. Once connected, data will be loaded from/sent to the database synchronously. The method dirty() will always return false. Making this many trips to the database is not very fast, so when possible, the data cache in MyMoneyFile is used.
|
|
|
|
|
|
|
|
Returns the account addressed by it's id. An exception will be thrown upon error conditions.
Implements IMyMoneyStorage. |
|
|
This method returns the number of accounts currently known to this storage in the range 0..MAXUINT
Implements IMyMoneyStorage. |
|
|
Implements IMyMoneySerialize. |
|
|
This method returns a list of accounts inside the storage object.
Implements IMyMoneySerialize. |
|
||||||||||||
|
This method is used to add one account as sub-ordinate to another (parent) account. The objects that are passed will be modified accordingly. An exception will be thrown upon error conditions.
Implements IMyMoneySerialize. |
|
|
This method is used to create a new account An exception will be thrown upon error conditions.
Implements IMyMoneySerialize. |
|
|
This method is used to add a new budget to the engine. It must be sure, that the id of the object is not filled. When the method returns to the caller, the id will be filled with the newly created object id value. An exception will be thrown upon erronous situations.
Implements IMyMoneyStorage. |
|
|
This method is used to add a new currency object to the engine. The ID of the object is the trading symbol, so there is no need for an additional ID since the symbol is guaranteed to be unique. An exception will be thrown upon erronous situations.
Implements IMyMoneyStorage. |
|
|
Adds an institution to the storage. A respective institution-ID will be generated within this record. The ID is stored as QString in the object passed as argument. An exception will be thrown upon error conditions.
Implements IMyMoneySerialize. |
|
|
This method is used to create a new payee An exception will be thrown upon error conditions
Implements IMyMoneySerialize. |
|
|
This method adds a price entry to the price list. Implements IMyMoneySerialize. |
|
|
This method is used to add a new report to the engine. It must be sure, that the id of the object is not filled. When the method returns to the caller, the id will be filled with the newly created object id value. An exception will be thrown upon erronous situations.
Implements IMyMoneyStorage. |
|
|
This method is used to add a scheduled transaction to the engine. It must be sure, that the id of the object is not filled. When the method returns to the caller, the id will be filled with the newly created object id value. An exception will be thrown upon erronous situations.
Implements IMyMoneyStorage. |
|
|
This method is used to create a new security object. The ID will be created automatically. The object passed with the parameter An exception will be thrown upon error conditions.
Implements IMyMoneyStorage. |
|
||||||||||||
|
Adds a transaction to the file-global transaction pool. A respective transaction-ID will be generated within this record. The ID is stored QString with the object. An exception will be thrown upon error conditions.
Implements IMyMoneySerialize. |
|
|
This method is used to return the standard asset account
Implements IMyMoneySerialize. |
|
||||||||||||
|
This method is used to return the actual balance of an account without it's sub-ordinate accounts. If a
Implements IMyMoneyStorage. |
|
|
This method is used to retrieve a single MyMoneyBudget object. The id of the object must be supplied in the parameter An exception will be thrown upon erronous situations.
Implements IMyMoneyStorage. |
|
|
This method is used to retrieve the id to a corresponding name of a budget An exception will be thrown upon error conditions.
Implements IMyMoneyStorage. |
|
|
Implements IMyMoneySerialize. |
|
|
This method is used to retrieve the list of all budgets known to the engine. An exception will be thrown upon erronous situations.
Implements IMyMoneySerialize. |
|
|
Clear all internal caches (used internally for performance measurements) Implements IMyMoneyStorage. |
|
|
This method is provided to allow closing of the database before logoff Implements IMyMoneyStorage. |
|
|
Implements IMyMoneyStorage. |
|
|
This method is used to get a SQL reader for subsequent database access Implements IMyMoneySerialize. |
|
|
This method returns the number of budgets currently known to file in the range 0..MAXUINT
Implements IMyMoneyStorage. |
|
|
This method returns the number of reports currently known to file in the range 0..MAXUINT
Implements IMyMoneyStorage. |
|
|
Implements IMyMoneySerialize. |
|
|
This method is used to retrieve a single MyMoneySecurity object. The id of the object must be supplied in the parameter An exception will be thrown upon erronous situations.
Implements IMyMoneyStorage. |
|
|
This method is used to retrieve the list of all currencies known to the engine. An exception will be thrown upon erronous situations.
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
This method is used to remove an existing key/value pair from the container. If the key does not exist, the container is not changed.
Reimplemented from MyMoneyKeyValueContainer. |
|
|
This method returns an indicator if the storage object has been changed after it has last been saved to permanent storage.
Implements IMyMoneyStorage. |
|
|
This method is used to duplicate an IMyMoneyStorage object and return a pointer to the newly created copy. The caller of this method is the new owner of the object and must destroy it. Implements IMyMoneyStorage. |
|
|
This method is used to return the standard equity account
Implements IMyMoneySerialize. |
|
|
This method is used to return the standard expense account
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
This method is used when a database file is open, and the data is to be saved in a different file or format. It will ensure that all data from the database is available in memory to enable it to be written. Implements IMyMoneySerialize. |
|
|
This method is used to determince, if the account with the given ID is referenced by any split in m_transactionList. An exception will be thrown upon error conditions.
Implements IMyMoneyStorage. |
|
|
This method is used to return the standard income account
Implements IMyMoneySerialize. |
|
|
Returns the institution of a given ID
Implements IMyMoneyStorage. |
|
|
This method returns the number of institutions currently known to file in the range 0..MAXUINT
Implements IMyMoneyStorage. |
|
|
Implements IMyMoneySerialize. |
|
|
This method returns a list of the institutions inside a MyMoneyStorage object
Implements IMyMoneySerialize. |
|
|
This method returns whether a given transaction is already in memory, to avoid reloading it from the database Implements IMyMoneySerialize. |
|
||||||||||||
|
This method checks, if the given
Implements IMyMoneyStorage. |
|
|
This method is used to check whether a given account id references one of the standard accounts or not. An exception will be thrown upon error conditions.
Implements IMyMoneyStorage. |
|
|
Implements IMyMoneySerialize. |
|
|
This method is used to return the standard liability account
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |
|
|
Implements IMyMoneySerialize. |