Merge "Add a _LocalizedNumParser class and 4 static functions" into tizen_2.1
[platform/framework/native/appfw.git] / inc / FIoDataRow.h
1 //\r
2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
3 //\r
4 // Licensed under the Apache License, Version 2.0 (the License);\r
5 // you may not use this file except in compliance with the License.\r
6 // You may obtain a copy of the License at\r
7 //\r
8 //     http://www.apache.org/licenses/LICENSE-2.0\r
9 //\r
10 // Unless required by applicable law or agreed to in writing, software\r
11 // distributed under the License is distributed on an "AS IS" BASIS,\r
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13 // See the License for the specific language governing permissions and\r
14 // limitations under the License.\r
15 //\r
16 \r
17 /**\r
18 * @file         FIoDataRow.h\r
19 * @brief                This is the header file for the %DataRow class.\r
20 *\r
21 * This header file contains the declarations of the %DataRow class.\r
22 */\r
23 \r
24 #ifndef _FIO_DATA_ROW_H_\r
25 #define _FIO_DATA_ROW_H_\r
26 \r
27 #include <FBaseObject.h>\r
28 #include <FBaseByteBuffer.h>\r
29 #include <FBaseDateTime.h>\r
30 \r
31 namespace Tizen { namespace Io\r
32 {\r
33 \r
34 /**\r
35 * @class                DataRow\r
36 \r
37 * @brief                This class provides methods to create a row in in-memory table.\r
38 *\r
39 * @since                2.1\r
40 *\r
41 * @final                This class is not intended for extension.\r
42 *\r
43 * The %DataRow class provides methods to create a row in in-memory table.\r
44 *\r
45 * @see Tizen::Io::DataSet\r
46 */\r
47 class _OSP_EXPORT_ DataRow\r
48            : public Tizen::Base::Object\r
49 {\r
50 \r
51 public:\r
52         /**\r
53         * This destructor overrides Tizen::Base::Object::~Object().\r
54         *\r
55         * @since                2.1\r
56         */\r
57         virtual ~DataRow(void);\r
58 \r
59         /**\r
60         * Sets a Tizen::Base::ByteBuffer value to the column whose index is specified.\r
61         *\r
62         * @since                2.1\r
63         *\r
64         * @return               An error code\r
65         * @param[in]            columnIndex             The index of the column whose value is set @n\r
66         *                                                               The column index starts from 0.\r
67         * @param[in]            pValue                  The value to set @n\r
68         *                                                               The specified @c pValue is a pointer to user-provided Tizen::Base::ByteBuffer type buffer.\r
69         * @exception            E_SUCCESS               The method is successful.\r
70         * @exception            E_INVALID_ARG   Either of the following conditions has occurred: @n\r
71         *                                                                       - The specified @c columnIndex is out of range.\r
72         *                                                                       - The specified @c pValue is @c null.\r
73         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
74         * @remarks              This method performs a shallow copy. It copies only the pointer; not the element itself. @n\r
75         *                               The platform will take the ownership of @c pValue after calling this method.\r
76         */\r
77         result SetBlobAt(int columnIndex, Tizen::Base::ByteBuffer* pValue);\r
78 \r
79 \r
80         /**\r
81         * Sets a Tizen::Base::DateTime value to the column whose index is specified.\r
82         *\r
83         * @since                2.1\r
84         *\r
85         * @return               An error code\r
86         * @param[in]            columnIndex             The index of the column whose value is set @n\r
87         *                                                               The column index starts from 0.\r
88         * @param[in]            value                   The value to set\r
89         * @exception            E_SUCCESS                       The method is successful.\r
90         * @exception            E_INVALID_ARG           The specified @c columnIndex is out of range.\r
91         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
92         */\r
93         result SetDateTimeAt(int columnIndex, const Tizen::Base::DateTime& value);\r
94 \r
95 \r
96         /**\r
97         * Sets a @c double value to the column whose index is specified.\r
98         *\r
99         * @since                2.1\r
100         *\r
101         * @return               An error code\r
102         * @param[in]            columnIndex             The index of the column whose value is set @n\r
103         *                                                               The column index starts from 0.\r
104         * @param[in]            value                   The value to set\r
105         * @exception            E_SUCCESS                       The method is successful.\r
106         * @exception            E_INVALID_ARG           The specified @c columnIndex is out of range.\r
107         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
108         */\r
109         result SetDoubleAt(int columnIndex, double value);\r
110 \r
111         /**\r
112         * Sets an @c int value to the column whose index is specified.\r
113         *\r
114         * @since                2.1\r
115         *\r
116         * @return               An error code\r
117         * @param[in]            columnIndex             The index of the column whose value is set @n\r
118         *                                                               The column index starts from 0.\r
119         * @param[in]            value                   The value to set\r
120         * @exception            E_SUCCESS                       The method is successful.\r
121         * @exception            E_INVALID_ARG           The specified @c columnIndex is out of range.\r
122         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
123         */\r
124         result SetIntAt(int columnIndex, int value);\r
125 \r
126         /**\r
127         * Sets a @c long @c long value to the column whose index is specified.\r
128         *\r
129         * @since                2.1\r
130         *\r
131         * @return               An error code\r
132         * @param[in]            columnIndex             The index of the column whose value is set @n\r
133         *                                                               The column index starts from 0.\r
134         * @param[in]            value                   The value to set\r
135         * @exception            E_SUCCESS                       The method is successful.\r
136         * @exception            E_INVALID_ARG           The specified @c columnIndex is out of range.\r
137         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
138         */\r
139         result SetInt64At(int columnIndex, long long value);\r
140 \r
141         /**\r
142         * Sets a Tizen::Base::String value to the column whose index is specified.\r
143         *\r
144         * @since                2.1\r
145         *\r
146         * @return               An error code\r
147         * @param[in]            columnIndex             The index of the column whose value is set @n\r
148         *                                                               The column index starts from 0.\r
149         * @param[in]            value                   The value to set\r
150         * @exception            E_SUCCESS                       The method is successful.\r
151         * @exception            E_INVALID_ARG           The specified @c columnIndex is out of range.\r
152         * @exception            E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
153         */\r
154         result SetStringAt(int columnIndex, const Tizen::Base::String& value);\r
155 \r
156 private:\r
157         //\r
158         // This default constructor is intentionally declared as private so that only the platform can create an instance.\r
159         //\r
160         // @since       2.1\r
161         //\r
162         DataRow(void);\r
163 \r
164         //\r
165         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.\r
166         //\r
167         // @since       2.1\r
168         //\r
169         DataRow(const DataRow& rhs);\r
170 \r
171         //\r
172         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.\r
173         //\r
174         // @since       2.1\r
175         //\r
176         DataRow& operator =(const DataRow& rhs);\r
177 \r
178         class _DataRowImpl* __pDataRowImpl;\r
179         friend class _DataRowImpl;\r
180 \r
181 }; // DataRow\r
182 \r
183 }} // Tizen::Io\r
184 \r
185 #endif // _FIO_DATA_ROW_H_\r