2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @brief This is the header file for the %DataRow class.
21 * This header file contains the declarations of the %DataRow class.
24 #ifndef _FIO_DATA_ROW_H_
25 #define _FIO_DATA_ROW_H_
27 #include <FBaseObject.h>
28 #include <FBaseByteBuffer.h>
29 #include <FBaseDateTime.h>
31 namespace Tizen { namespace Io
37 * @brief This class provides methods to create a row in in-memory table.
41 * @final This class is not intended for extension.
43 * The %DataRow class provides methods to create a row in in-memory table.
45 * @see Tizen::Io::DataSet
47 class _OSP_EXPORT_ DataRow
48 : public Tizen::Base::Object
53 * This destructor overrides Tizen::Base::Object::~Object().
57 virtual ~DataRow(void);
60 * Sets a Tizen::Base::ByteBuffer value to the column with the specified index.
64 * @return An error code
65 * @param[in] columnIndex The index of the column whose value is set @n
66 * The column index starts from @c 0.
67 * @param[in] pValue The value to set @n
68 * The specified @c pValue is a pointer to user-provided Tizen::Base::ByteBuffer type buffer.
69 * @exception E_SUCCESS The method is successful.
70 * @exception E_INVALID_ARG Either of the following conditions has occurred:
71 * - The specified @c columnIndex is out of range.
72 * - The specified @c pValue is @c null.
73 * @exception E_TYPE_MISMATCH The column type accessed by the method do not match.
75 * - This method performs a shallow copy. It copies just the pointer and not the element itself.
76 * - The platform will take the ownership of @c pValue after calling this method.
78 result SetBlobAt(int columnIndex, Tizen::Base::ByteBuffer* pValue);
82 * Sets a Tizen::Base::DateTime value to the column with the specified index.
86 * @return An error code
87 * @param[in] columnIndex The index of the column whose value is set @n
88 * The column index starts from 0.
89 * @param[in] value The value to set
90 * @exception E_SUCCESS The method is successful.
91 * @exception E_INVALID_ARG The specified @c columnIndex is out of range.
92 * @exception E_TYPE_MISMATCH The column type accessed by the method do not match.
93 * @remarks Tizen::Io::DbColumnType of the specified @c value is ::DB_COLUMNTYPE_TEXT.
95 result SetDateTimeAt(int columnIndex, const Tizen::Base::DateTime& value);
99 * Sets a @c double value to the column with the specified index.
103 * @return An error code
104 * @param[in] columnIndex The index of the column whose value is set @n
105 * The column index starts from @c 0.
106 * @param[in] value The value to set
107 * @exception E_SUCCESS The method is successful.
108 * @exception E_INVALID_ARG The specified @c columnIndex is out of range.
109 * @exception E_TYPE_MISMATCH The column type accessed by the method do not match.
111 result SetDoubleAt(int columnIndex, double value);
114 * Sets an @c int value to the column with the specified index.
118 * @return An error code
119 * @param[in] columnIndex The index of the column whose value is set @n
120 * The column index starts from @c 0.
121 * @param[in] value The value to set
122 * @exception E_SUCCESS The method is successful.
123 * @exception E_INVALID_ARG The specified @c columnIndex is out of range.
124 * @exception E_TYPE_MISMATCH The column type accessed by the operation do not match.
126 result SetIntAt(int columnIndex, int value);
129 * Sets a @c long @c long value to the column with the specified index.
133 * @return An error code
134 * @param[in] columnIndex The index of the column whose value is set @n
135 * The column index starts from @c 0.
136 * @param[in] value The value to set
137 * @exception E_SUCCESS The method is successful.
138 * @exception E_INVALID_ARG The specified @c columnIndex is out of range.
139 * @exception E_TYPE_MISMATCH The column type accessed by the method do not match.
141 result SetInt64At(int columnIndex, long long value);
144 * Sets a Tizen::Base::String value to the column with the specified index.
148 * @return An error code
149 * @param[in] columnIndex The index of the column whose value is set @n
150 * The column index starts from @c 0.
151 * @param[in] value The value to set
152 * @exception E_SUCCESS The method is successful.
153 * @exception E_INVALID_ARG The specified @c columnIndex is out of range.
154 * @exception E_TYPE_MISMATCH The column type accessed by the method do not match.
156 result SetStringAt(int columnIndex, const Tizen::Base::String& value);
160 // This default constructor is intentionally declared as private so that only the platform can create an instance.
167 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
171 DataRow(const DataRow& rhs);
174 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
178 DataRow& operator =(const DataRow& rhs);
180 class _DataRowImpl* __pDataRowImpl;
181 friend class _DataRowImpl;
187 #endif // _FIO_DATA_ROW_H_