|
Ananas Library
0.9.5
|
#include <auser.h>
Public Member Functions | |
| aUser (Q_ULLONG userId, aDatabase *adb) | |
| aUser (aDatabase *adb) | |
| virtual ERR_Code | initObject () |
| virtual ERR_Code | New (const QString &login, const QString &passwd="", const QString &Name="", const QString &LastName="") |
| virtual ERR_Code | Delete () |
| virtual ERR_Code | Update () |
| virtual ERR_Code | Select () |
| virtual ERR_Code | Select (Q_ULLONG userId) |
| virtual ERR_Code | addRole (Q_ULLONG roleId) |
| virtual ERR_Code | delRole (Q_ULLONG roleId) |
| virtual ERR_Code | UpdateRole () |
| QValueList< aRole * > | getRoles (bool assigned) |
| bool | hasRole (Q_ULLONG roleId) |
| virtual Q_ULLONG | getUserId (const QString &login, const QString &password) |
| bool | First () |
| bool | Next () |
| bool | Last () |
| bool | Prev () |
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 Q_ULLONG | docId () |
| Returns document database id. 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 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 | 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 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 users in database.
| aUser::aUser | ( | Q_ULLONG | userId, |
| aDatabase * | adb | ||
| ) |
Constructor for concrete object class creating
References initObject(), and Select().
| aUser::aUser | ( | aDatabase * | adb | ) |
Constructor for abstract object class creating
References initObject().
|
virtual |
Assign role to user
| roleId | - id role to asssign |
References aObject::setSelected(), aObject::sysValue(), and aObject::table().
Referenced by aRole::addUser().
|
virtual |
|
virtual |
Drop role
| roleId | - id role to drop |
References aObject::sysValue(), and aObject::table().
Referenced by aRole::delUser().
| bool aUser::First | ( | ) |
First
References aObject::First().
| QValueList< aRole * > aUser::getRoles | ( | bool | assigned | ) |
Returns list of roles, (un)assigned for this user. List elements must be deleted in called procedure.
| assibned | true for return assigned roles, false for retun unassigned roles |
References hasRole(), aRole::Select(), and aObject::sysValue().
|
virtual |
Gets user id
| login | user login |
| password | user password |
References aObject::table().
| bool aUser::hasRole | ( | Q_ULLONG | rid | ) |
Checks role assign
| rid | - role id to check |
References aObject::sysValue(), and aObject::table().
Referenced by getRoles(), and aRole::hasUser().
|
virtual |
Reimplement base class function
Reimplemented from aObject.
References aObject::initObject(), and aObject::tableInsert().
Referenced by aUser().
| bool aUser::Last | ( | ) |
Last
References aObject::Last().
|
virtual |
Inserts new element in elements table
| login | - login |
| password | - password |
| firstName | - first name |
| lastName | - last name |
References aObject::setSelected(), and aObject::table().
| bool aUser::Next | ( | ) |
Next
References aObject::Next().
| bool aUser::Prev | ( | ) |
Rpev
References aObject::Prev().
|
virtual |
Selected table and clear filter
References aObject::setSelected(), and aObject::table().
Referenced by aUser().
|
virtual |
Select table and set filter to user with given id
| id | - user id |
References aObject::setSelected(), and aObject::table().
|
virtual |
|
virtual |
Updates roles table values
1.8.5