Fix the boiler plate codes
[platform/framework/native/appfw.git] / src / io / inc / FIo_DataRowImpl.h
1 //
2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        FIo_DataRowImpl.h
19  * @brief       This is the header file for the %_DataRowImpl class.
20  *
21  * This header file contains declarations of the %_DataRowImpl class.
22  */
23
24 #ifndef _FIO_INTERNAL_DATAROW_IMPL_H_
25 #define _FIO_INTERNAL_DATAROW_IMPL_H_
26
27 #include <unique_ptr.h>
28 #include <FIoDbTypes.h>
29 #include <FOspConfig.h>
30 #include <FBaseCol.h>
31 #include <FIoDataRow.h>
32
33 namespace Tizen { namespace Base
34 {
35 class String;
36 class ByteBuffer;
37 class DateTime;
38 }}
39
40 namespace Tizen { namespace Io
41 {
42
43 class _DataItem
44         : public Tizen::Base::Object
45 {
46 public:
47         _DataItem(void);
48         ~_DataItem(void);
49         virtual int GetHashCode(void) const;
50
51         DbColumnType type;
52         int size;
53         int intValue;
54         long long int64Value;
55         double doubleValue;
56         Tizen::Base::Object* pObj;
57 };
58
59
60 /**
61  * @class       _DataRowImpl
62  * @brief       This class implements the DataRow.
63  * @since 2.1
64  *
65  * @see Tizen::Io::DataRow
66  */
67 class _DataRowImpl
68         : public Tizen::Base::Object
69 {
70
71 public:
72         _DataRowImpl(void);
73
74         virtual ~_DataRowImpl(void);
75
76         result SetBlobAt(int columnIndex, Tizen::Base::ByteBuffer* pValue);
77
78         result SetDateTimeAt(int columnIndex, const Tizen::Base::DateTime& value);
79
80         result SetDoubleAt(int columnIndex, double value);
81
82         result SetIntAt(int columnIndex, int value);
83
84         result SetInt64At(int columnIndex, long long value);
85
86         result SetStringAt(int columnIndex, const Tizen::Base::String& value);
87
88         static int GetHashCode(const Tizen::Base::Collection::ArrayList* pRowArrayList);
89
90         static _DataRowImpl* GetInstance(DataRow& dataRow);
91
92         static const _DataRowImpl* GetInstance(const DataRow& dataRow);
93
94         static DataRow* CreateDataRowInstanceN(int columnCount, Tizen::Base::Collection::ArrayList* pArrayListRow);
95
96         Tizen::Base::Collection::ArrayList* GetRowArrayList(void) const;
97
98         result Clone(const Tizen::Base::Collection::ArrayList* pOthersRowArrayList) const;
99
100 private:
101         Tizen::Base::Collection::ArrayList* __pDataRow;
102         Tizen::Base::Collection::ArrayList* __pColumnTypeList;
103         int __columnCount;
104
105         bool __dataSetDeleted;
106         Tizen::Base::Collection::LinkedList* __pRowImplList;
107
108         friend class _DataSetImpl;
109
110 }; //_DataRowImpl
111
112 }} // Tizen::Io
113
114 #endif  //_FIO_INTERNAL_DATAROW_IMPL_H_
115