Ananas Library  0.9.5
auser.h
1 /****************************************************************************
2 ** $Id: auser.h,v 1.3 2006/08/23 08:30:04 app Exp $
3 **
4 ** User object header file of
5 ** Ananas application library
6 **
7 ** Created : 20050527
8 **
9 ** Copyright (C) 2003-2005 Grigory Panov, Yoshkar-Ola.
10 **
11 ** This file is part of the Designer application of the Ananas
12 ** automation accounting system.
13 **
14 ** This file may be distributed and/or modified under the terms of the
15 ** GNU General Public License version 2 as published by the Free Software
16 ** Foundation and appearing in the file LICENSE.GPL included in the
17 ** packaging of this file.
18 **
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 **
22 ** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru
23 ** See http://www.leaderit.ru/gpl/ for GPL licensing information.
24 **
25 ** Contact org@leaderit.ru if any conditions of this licensing are
26 ** not clear to you.
27 **
28 **********************************************************************/
29 
30 #ifndef AUSER_H
31 #define AUSER_H
32 
33 #include "arole.h"
34 #include "adatabase.h"
35 #include "acfg.h"
36 #include "aobject.h"
37 #include <qvaluelist.h>
38 //class aDatabase;
39 //class aRole;
40 //class aObject;
41 
42 
43 
53 class ANANAS_EXPORT aUser: public aObject
54 {
55  Q_OBJECT
56 public:
57  aUser();
58  aUser(Q_ULLONG userId, aDatabase * adb);
59  aUser(aDatabase * adb);
60  virtual ERR_Code initObject();
61 
62 //public slots:
63 
64  virtual ERR_Code New( const QString &login,
65  const QString &passwd="",
66  const QString &Name="",
67  const QString &LastName="");
68 
69  virtual ERR_Code Delete();
70  virtual ERR_Code Update();
71  virtual ERR_Code Select();
72  virtual ERR_Code Select( Q_ULLONG userId );
73 
74  virtual ERR_Code addRole( Q_ULLONG roleId );
75  virtual ERR_Code delRole( Q_ULLONG roleId );
76  virtual ERR_Code UpdateRole();
77 
78  QValueList< aRole *> getRoles( bool assigned);
79 
80  bool hasRole( Q_ULLONG roleId);
81 // virtual ERR_Code setPassword( const QString & );
82  //virtual ERR_Code setLogin( const QString & );
83  //virtual ERR_Code setFirstName( const QString & );
84  //virtual ERR_Code setLastName( const QString & );
85 
86  virtual Q_ULLONG getUserId( const QString &login, const QString &password );
87  //virtual ERR_Code getRoles(QValueList<aRole> *lst);
88  bool First();
89  bool Next();
90  bool Last();
91  bool Prev();
92 };
93 
94 
95 #endif// AUSER_H
virtual bool Last(const QString &tableName="")
Перемещает указатель на последнюю запись SQL таблицы.
Definition: aobject.cpp:1078
Definition: auser.h:53
virtual ERR_Code initObject()
Init object after create.
Definition: aobject.cpp:253
virtual int Delete()
Definition: aobject.cpp:692
virtual bool Prev(const QString &tableName="")
Перемещает указатель на предыдующую запись SQL таблицы.
Definition: aobject.cpp:1052
virtual bool First(const QString &tableName="")
Перемещает указатель на первую запись SQL таблицы.
Definition: aobject.cpp:1065
virtual int New()
Add new object record in database.
Definition: aobject.cpp:625
virtual int Update()
Update curent selected object record to database.
Definition: aobject.cpp:718
Definition: adatabase.h:77
Definition: aobject.h:63
virtual bool Next(const QString &tableName="")
Перемещает указатель на следующую запись SQL таблицы.
Definition: aobject.cpp:1040