ALBA
albaResultQueryAbstractHandler.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaResultQueryAbstractHandler
5 Authors: Daniele Giunchi
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaResultQueryAbstractHandler_H__
18#define __albaResultQueryAbstractHandler_H__
19
20//----------------------------------------------------------------------------
21// Include:
22//----------------------------------------------------------------------------
23#include "albaDefines.h"
24#include "albaObject.h"
25#include "albaQueryObject.h"
26#include <vector>
27//----------------------------------------------------------------------------
28// forward references :
29//----------------------------------------------------------------------------
30
31//----------------------------------------------------------------------------
32// typedefs :
33//----------------------------------------------------------------------------
34
35typedef std::vector<std::vector<std::string> > WebRowSetStringDataTable;
36typedef std::vector<std::string> WebRowSetColumnTypeVector;
37typedef std::vector<std::string> WebRowSetColumnNameVector;
38
39typedef std::vector<std::vector<albaQueryObject *> > WebRowSetQueryObjectsTable;
45{
46public:
51
54
56 WebRowSetStringDataTable GetResultAsStringMatrix() {return m_MatrixStringResult;};
57
60
63
65 WebRowSetQueryObjectsTable GetResultAsObjectsMatrix() {return m_MatrixObjectResult;};
66
67
69 int GetNumberOfRecords() const;
70
72 int GetNumberOfFields() const;
73
75 virtual void LoadQueryResult() = 0;
76
78 virtual bool IsFailed() = 0;
79
80protected:
82 virtual void InternalResultReset();
83
87
89
90private:
91
92
93
94};
95#endif //__albaResultQueryAbstractHandler_H__
std::vector< std::vector< std::string > > WebRowSetStringDataTable
std::vector< std::string > WebRowSetColumnNameVector
std::vector< std::string > WebRowSetColumnTypeVector
std::vector< std::vector< albaQueryObject * > > WebRowSetQueryObjectsTable
Abstract superclass for all ALBA classes implementing RTTI APIs.
Definition: albaObject.h:38
class name: albaResultQueryAbstractHandler Interface for handle results from a query to a database
WebRowSetColumnNameVector m_ColumnsNameInformation
WebRowSetColumnTypeVector GetColumnsTypeInformationAsStringVector()
Get column type as list of string.
WebRowSetQueryObjectsTable GetResultAsObjectsMatrix()
Get result as string matrix.
albaAbstractTypeMacro(albaResultQueryAbstractHandler, albaObject)
RTTI macro.
int GetNumberOfRecords() const
Get number of records (rows)
virtual bool IsFailed()=0
load result of Query
int GetNumberOfFields() const
Get number of fields (columns)
virtual void InternalResultReset()
clear all the results
WebRowSetQueryObjectsTable m_MatrixObjectResult
virtual void LoadQueryResult()=0
load result of Query
WebRowSetColumnTypeVector m_ColumnsTypeInformation
albaResultQueryAbstractHandler()
constructor
WebRowSetColumnNameVector GetColumnsNameInformationAsStringVector()
Get column name as list of string.
virtual ~albaResultQueryAbstractHandler()
destructor
WebRowSetStringDataTable GetResultAsStringMatrix()
Get result as string matrix.