fintp_udal
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OracleColumn.h
Go to the documentation of this file.
1 /*
2 * FinTP - Financial Transactions Processing Application
3 * Copyright (C) 2013 Business Information Systems (Allevo) S.R.L.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>
17 * or contact Allevo at : 031281 Bucuresti, 23C Calea Vitan, Romania,
18 * phone +40212554577, office@allevo.ro <mailto:office@allevo.ro>, www.allevo.ro.
19 */
20 
21 #ifndef ORACLECOLUMN_H
22 #define ORACLECOLUMN_H
23 
24 #include "StringUtil.h"
25 #include "../DataColumn.h"
26 #include "OracleParameter.h"
27 
28 #include <string>
29 #include <vector>
30 #include <map>
31 using namespace std;
32 
33 #define MAX_ORACLE_COLUMN_NAME 50
34 
35 namespace FinTP
36 {
37  template <class T>
38 
43  class OracleColumn : public DataColumn< T >
44  {
51  public :
52 
53  OracleColumn( unsigned int dimension, int scale, const string& name = "" );
54  ~OracleColumn();
55 
56  void setValue( T value );
57  T getValue();
58 
59  int getInt()
60  {
61  return DataColumn< T >::getInt();
62  }
63 
64  long getLong()
65  {
66  return DataColumn< T >::getLong();
67  }
68 
69  short getShort()
70  {
72  }
73 
78  DataColumnBase* Clone();
79 
80  private :
81 
82  OracleColumn();
83  };
84 
85  template <>
87  {
88  return StringUtil::ParseLong( StringUtil::Trim( m_Value ) );
89  }
90 
91  template <>
93  {
94  return StringUtil::ParseInt( StringUtil::Trim( m_Value ) );
95  }
96 
97  template <>
99  {
100  return StringUtil::ParseShort( StringUtil::Trim( m_Value ) );
101  }
102  //typedef std::pair< std::string, OracleColumnBase *> OracleResultColumn;
103 }
104 
105 #endif // ORACLECOLUMN_H