|
Ananas Library
0.9.5
|
#include <adocjournal.h>
Public Slots | |
| aDocument * | CurrentDocument () |
| Gets current document. More... | |
| virtual ERR_Code | Delete () |
| Delets current document. More... | |
| virtual ERR_Code | Select (QDateTime from, QDateTime to, const QString &mdName="") |
| Select documents at some period. More... | |
| virtual ERR_Code | Select (const QString &num, const QString &mdName="") |
| Select document by number and type. More... | |
Public Slots inherited from aObject | |
| virtual QString | Uid () |
| virtual bool | IsSelected () |
| Checks if object selected. More... | |
| virtual bool | IsMarkDeleted (const QString &tname="") |
| Checks "Deleted" marker. More... | |
| virtual bool | IsMarked () |
| Checks "Marked" marker. More... | |
| virtual int | SetMarkDeleted (bool Deleted, const QString &tablename="") |
| Устанавливает признак логического удаления объекта (записи SQL таблицы) More... | |
| virtual int | SetMarked (bool Marked) |
| Выставляет отметку на объекте. More... | |
| virtual int | New () |
| Add new object record in database. More... | |
| virtual int | Copy () |
| virtual int | Delete () |
| virtual int | Update () |
| Update curent selected object record to database. More... | |
| virtual int | Conduct () |
| Conducts document. More... | |
| virtual int | UnConduct () |
| Unconducts document. More... | |
| virtual bool | IsConducted () |
| Checks if document has been conducted. More... | |
| virtual QString | Kind (const QString &name=QString::null) |
| virtual QVariant | Value (const QString &name, const QString &tableName="") |
| Return field value of the primary object database table. More... | |
| virtual int | SetValue (const QString &name, const QVariant &value, const QString &tableName="") |
| Set field value of the primary object database table. More... | |
| virtual QVariant | sysValue (const QString &name, const QString &tableName="") |
| Gets system field value. More... | |
| virtual int | setSysValue (const QString &name, QVariant value, const QString &tableName="") |
| Sets system field value. More... | |
| virtual int | SetFilter (const QString &valname, const QVariant &value) |
| Задает фильтр записей/объектов | |
| virtual int | ClearFilter () |
| Чистит фильтр записей/объектов. More... | |
| virtual int | TableSetFilter (const QString &tname, const QString &valname, const QVariant &value) |
| Устанавливает вильтр записей табличной части объекта. More... | |
| virtual int | TableClearFilter (const QString &tname) |
| Чистит фильтр записей указанной табличной части объекта. More... | |
| virtual bool | IsFiltred () |
| Показывает наличие активного фильтра | |
| virtual int | TableUpdate (const QString &tablename) |
| virtual QString | displayString () |
| Возвращает строку, предназначенную для отображения пользователю объекта сложного типа. More... | |
| virtual int | LastErrorCode () |
| virtual QString | LastErrorMessage () |
Public Member Functions | |
| aDocJournal (aCfgItem context, aDatabase *adb=0) | |
| Constructor. Init object with context. More... | |
| aDocJournal (const QString &name, aDatabase *adb=0) | |
| Constructor. Init object with md object, founded by name. More... | |
| aDocJournal (aDatabase *adb=0) | |
| Constructor. Creates system journal. More... | |
| virtual ERR_Code | initObject () |
| Init object after create. More... | |
| ERR_Code | selectDocument (Q_ULLONG idd) |
| Select document with id =idd. More... | |
| virtual Q_ULLONG | docId () |
| Get current document id. More... | |
| int | docType () |
| Gets current document type. More... | |
| int | type () |
| QString | nextNumber (const QString &prefix, int mdId) |
| Generate next document number. More... | |
| QVariant | getDate () |
| Gets current document date. More... | |
| QString | getNumber () |
| Gets current document prefix + number. More... | |
| int | getSerialNumber () |
| Gets current document number. More... | |
| ERR_Code | setDate (QVariant date) |
| Sets current document date. More... | |
| ERR_Code | setNumber (QVariant number) |
| Sets current document number. More... | |
| virtual ERR_Code | New (Q_ULLONG idd, const QString &docPrefix, int type) |
| Create new record in system journal. More... | |
| virtual ERR_Code | deleteDocument (Q_ULLONG idd) |
| Delets document with id =idd. More... | |
| Q_ULLONG | findDocument (Q_ULLONG idd) |
| Find document by id. More... | |
| Q_ULLONG | findDoc (const QString &num, int type) |
| Find document by number and type. More... | |
| QString | getPrefix () |
| Gets current document prefix. More... | |
| QString | selectionFilter (QDateTime from, QDateTime to, const QString &mdName="", bool full=false) |
| QString | selectionFilter (const QString &num, const QString &mdName="", bool full=false) |
Public Member Functions inherited from aObject | |
| aObject (QObject *parent=0, const char *name=0) | |
| aObject (const QString &oname, aDatabase *adb, QObject *parent=0, const char *name=0) | |
| aObject (aCfgItem context, aDatabase *adb, QObject *parent=0, const char *name=0) | |
| Creates aObject, inited by md object. More... | |
| virtual | ~aObject () |
| Virtual destructor. | |
| virtual bool | checkStructure () |
| Not implemented. More... | |
| ERR_Code | init () |
| Tune on metadata object and it's database tables. More... | |
| ERR_Code | decodeDocNum (QString nm, QString &pref, int &num) |
| Осуществляет выделение символьного префикса из строки. More... | |
| virtual ERR_Code | select (Q_ULLONG id) |
| Q_ULLONG | getUid () |
| Возвращает уникальный идентификатор объекта из базы данных. More... | |
| bool | selected (const QString &tablename="") |
| Показывает задан ли текущий объект или запись в его табличной части. More... | |
| ERR_Code | select (const QString &query, const QString &tableName="") |
| Осуществляет SQL запрос. More... | |
| aDataTable * | table (const QString &name="") |
| Return the table of object by it's name. More... | |
| virtual bool | Next (const QString &tableName="") |
| Перемещает указатель на следующую запись SQL таблицы. More... | |
| virtual bool | Prev (const QString &tableName="") |
| Перемещает указатель на предыдующую запись SQL таблицы. More... | |
| virtual bool | First (const QString &tableName="") |
| Перемещает указатель на первую запись SQL таблицы. More... | |
| virtual bool | Last (const QString &tableName="") |
| Перемещает указатель на последнюю запись SQL таблицы. More... | |
Additional Inherited Members | |
Public Attributes inherited from aObject | |
| aCfg * | md |
| aCfgItem | obj |
| aDatabase * | db |
Protected Member Functions inherited from aObject | |
| virtual aCfgItem | displayStringContext () |
| Возвращает контекст (узел дерева) метаданных для вычисления строкового представления сложного типа. | |
| virtual ERR_Code | setObject (aCfgItem newobject) |
| Sets new object type after create. More... | |
| bool | isInited () |
| void | setInited (bool flag) |
| ERR_Code | tableInsert (const QString &dbname, aCfgItem obj, const QString &name="") |
| Insert table name and its link into internal buffer. More... | |
| ERR_Code | tableInsert (const QString &dbname, const QString &name="") |
| Insert table name and its link into internal buffer. More... | |
| ERR_Code | tableRemove (const QString &name="") |
| Remove table from buffer. More... | |
| virtual QVariant | tValue (const QString &tablename, const QString &name) |
| Return field value of the secondary object database table. | |
| virtual ERR_Code | setTValue (const QString &tablename, const QString &name, const QVariant &value) |
| Set field value of the secondary object database table. | |
| virtual QString | trSysName (const QString &sname) |
| Not implemented. More... | |
| void | setSelected (bool sel, const QString &tablename="") |
| Явно задает состояние выбранности объекта или записи его табличной части. | |
| virtual ERR_Code | setTFilter (const QString &tname, const QString &valname, const QVariant &value) |
| Устанавливает вильтр записей табличной части объекта. | |
| virtual ERR_Code | clearTFilter (const QString &tname) |
| Чистит фильтр записей указанной табличной части объекта. | |
| void | setLastError (int, QString) |
| Задает значения свойствам lastErrorCode и lastErrorMessage класса More... | |
Protected Attributes inherited from aObject | |
| bool | concrete |
Not visual object used for working with system journal. Used as interface between database and script or wObjects Included in aDocument for linked document and system journal
| aDocJournal::aDocJournal | ( | aCfgItem | context, |
| aDatabase * | adb = 0 |
||
| ) |
Constructor. Init object with context.
| context | - md object |
| adb | - link to database |
References initObject().
| aDocJournal::aDocJournal | ( | const QString & | name, |
| aDatabase * | adb = 0 |
||
| ) |
Constructor. Init object with md object, founded by name.
| name | - md object name |
| adb | - link to database |
References initObject().
| aDocJournal::aDocJournal | ( | aDatabase * | adb = 0 | ) |
|
slot |
Gets current document.
References docId(), docType(), aCfg::find(), and aDocument::select().
Referenced by Delete(), and wDBTable::systemIcon().
|
virtualslot |
Delets current document.
References CurrentDocument(), and aDocument::Delete().
|
virtual |
Delets document with id =idd.
| idd | - document id. |
References findDocument(), aObject::LastErrorCode(), aDatabase::markDeleted(), aLog::print(), aObject::setLastError(), and aObject::table().
Referenced by aDocument::Delete().
|
virtual |
Get current document id.
Get database id for current document.
Reimplemented from aObject.
References aDataTable::sysValue(), and aObject::table().
Referenced by CurrentDocument(), docType(), and getPrefix().
| int aDocJournal::docType | ( | ) |
Gets current document type.
References docId(), and aDatabase::uidType().
Referenced by CurrentDocument(), and Select().
| Q_ULLONG aDocJournal::findDoc | ( | const QString & | number, |
| int | type | ||
| ) |
Find document by number and type.
| number | - document number |
| type | - document type |
References aObject::decodeDocNum(), aLog::print(), aObject::setSelected(), aDataTable::sysValue(), and aObject::table().
| Q_ULLONG aDocJournal::findDocument | ( | Q_ULLONG | idd | ) |
Find document by id.
| idd | - document number. |
References aObject::getUid(), aLog::print(), aObject::setSelected(), and aObject::table().
Referenced by deleteDocument(), aDocument::First(), aDocument::Last(), aDocument::Next(), aDocument::Prev(), aDocument::select(), aDocument::Select(), and wDBTable::systemIcon().
| QVariant aDocJournal::getDate | ( | ) |
Gets current document date.
References aObject::selected(), and aObject::table().
Referenced by aDocument::sysValue().
| QString aDocJournal::getNumber | ( | ) |
Gets current document prefix + number.
References aObject::selected(), and aObject::table().
Referenced by aDocument::sysValue().
| QString aDocJournal::getPrefix | ( | ) |
Gets current document prefix.
References aDatabase::db(), and docId().
Referenced by aDocument::Copy().
| int aDocJournal::getSerialNumber | ( | ) |
Gets current document number.
References aObject::selected(), and aObject::table().
Referenced by aDocument::sysValue().
|
virtual |
Init object after create.
Need setObject( id ), where id - if of the metadata object of the adb->cfg loaded Configuration.
Reimplemented from aObject.
References aCfg::attr(), aDatabase::cfg, aCfg::find(), aObject::LastErrorCode(), aCfg::parent(), aLog::print(), aObject::setLastError(), aDatabase::tableDbName(), aObject::tableInsert(), and aCfg::text().
Referenced by aDocJournal().
|
virtual |
Create new record in system journal.
Record create afte crate new document and use information about doc's database id, prefix and metadata id(type). Document number generate automatically by nextNumber().
| idd | - database document id. |
| docPrefix | - document number prefix. |
| type | - document metadata id. |
References nextNumber(), aLog::print(), selectDocument(), aObject::setSelected(), and aObject::table().
Referenced by aDocument::Copy(), and aDocument::New().
| QString aDocJournal::nextNumber | ( | const QString & | prefix, |
| int | mdId | ||
| ) |
Generate next document number.
| prefix | - number prefix |
| mdId | - document's number in metadata |
References aDatabase::db(), and aLog::print().
Referenced by New().
|
virtualslot |
Select documents at some period.
| from | - begin date |
| to | - end date |
| nmName | - document type |
References docType(), aCfg::find(), aCfg::id(), aObject::setSelected(), aObject::table(), and type().
|
virtualslot |
Select document by number and type.
| number | - document number |
| nmName | - document type |
References aCfg::attr(), aObject::decodeDocNum(), aCfg::find(), aLog::print(), aObject::setSelected(), and aObject::table().
| ERR_Code aDocJournal::selectDocument | ( | Q_ULLONG | idd | ) |
Select document with id =idd.
| idd | - document id. |
References aObject::setSelected(), and aObject::table().
Referenced by New().
| ERR_Code aDocJournal::setDate | ( | QVariant | date | ) |
Sets current document date.
| date | - document date. |
References aObject::selected(), and aObject::table().
Referenced by aDocument::setSysValue().
| ERR_Code aDocJournal::setNumber | ( | QVariant | number | ) |
Sets current document number.
| number | - document number |
References aObject::decodeDocNum(), aObject::selected(), and aObject::table().
Referenced by aDocument::setSysValue().
|
inline |
Referenced by Select().
1.8.5