equal
deleted
inserted
replaced
134 |
134 |
135 /** |
135 /** |
136 * Creates an entry in the lookup table. |
136 * Creates an entry in the lookup table. |
137 * @param[in] aLookupItem The lookup item to be created in the database. |
137 * @param[in] aLookupItem The lookup item to be created in the database. |
138 */ |
138 */ |
139 void createEntry( const QLookupItem& aLookupItem ); |
139 void createEntry( QLookupItem& aLookupItem ); |
140 |
140 |
141 /** |
141 /** |
142 * Updates an entry in the lookup table. |
142 * Updates an entry in the lookup table. |
143 * The source id and type is used to find the entry in db |
143 * The source id and type is used to find the entry in db |
144 * @param[in] aLookupItem The lookup item to be updated in the database. |
144 * @param[in] aLookupItem The lookup item to be updated in the database. |
163 * Deletes an entry from the lookup table. |
163 * Deletes an entry from the lookup table. |
164 * The source id and type is used to find the entry in db |
164 * The source id and type is used to find the entry in db |
165 * @param[in] aLookupItem The lookup item to be deleted from the database. |
165 * @param[in] aLookupItem The lookup item to be deleted from the database. |
166 */ |
166 */ |
167 void deleteEntryBySourceIdAndType( const QLookupItem& aLookupItem ); |
167 void deleteEntryBySourceIdAndType( const QLookupItem& aLookupItem ); |
168 |
|
169 /** |
|
170 * Deletes an entry from the lookup table. |
|
171 * The id is used to find the entry in db |
|
172 * @param[in] aLookupItem The lookup item to be deleted from the database. |
|
173 */ |
|
174 void deleteEntryById( const QLookupItem& aLookupItem ); |
|
175 |
168 |
176 /** |
169 /** |
177 * Finds an entry in the lookup table. |
170 * Finds an entry in the lookup table. |
178 * @param[in/out] aLookupItem The lookup item to be found in the database. The source id and source type |
171 * @param[in/out] aLookupItem The lookup item to be found in the database. The source id and source type |
179 * is passed in the lookup item. If the entry is found, all other fields are updated in the lookup item. |
172 * is passed in the lookup item. If the entry is found, all other fields are updated in the lookup item. |
195 * @param[out] aLookupItemArray List of lookup entries found. |
188 * @param[out] aLookupItemArray List of lookup entries found. |
196 */ |
189 */ |
197 void findEntriesByLandmarkId( const quint32 aLandmarkId, |
190 void findEntriesByLandmarkId( const quint32 aLandmarkId, |
198 QList<QLookupItem>& aLookupItemArray ); |
191 QList<QLookupItem>& aLookupItemArray ); |
199 |
192 |
200 /** |
193 /** |
201 * Finds list of lookup items given a source type. |
|
202 * @param[in] aSourceType The source type to be found in the lookup database. |
|
203 * @param[out] aLookupItemArray List of lookup entries found. |
|
204 */ |
|
205 void findEntriesBySourceType( const quint32 aSourceType, |
|
206 QList<QLookupItem>& aLookupItemArray ); |
|
207 |
|
208 |
|
209 /** |
|
210 * Gets list of lookup items. |
194 * Gets list of lookup items. |
211 * @param[in] aCollectionId The collection id, whose whose corresponding entries needs to be fetched. |
195 * @param[in] aCollectionId The collection id, whose whose corresponding entries needs to be fetched. |
212 * By default all the entries in the lookup db are fetched. |
196 * By default all the entries in the lookup db are fetched. |
213 * @param[out] aLookupItemArray List of lookup entries found. |
197 * @param[out] aLookupItemArray List of lookup entries found. |
214 */ |
198 */ |
220 // fills the lookup entry |
204 // fills the lookup entry |
221 void fillLookupEntry( QSqlQuery &aRecord, QLookupItem &aLookupItem ); |
205 void fillLookupEntry( QSqlQuery &aRecord, QLookupItem &aLookupItem ); |
222 |
206 |
223 // Handle to the items database |
207 // Handle to the items database |
224 QSqlDatabase *mDb; |
208 QSqlDatabase *mDb; |
|
209 |
|
210 // Flag to indicate if db is open |
|
211 bool mDbOpen; |
225 }; |
212 }; |
226 #endif // LOCATIONDATA_LOOKUPDB_H |
213 #endif // LOCATIONDATA_LOOKUPDB_H |
227 |
214 |
228 // End of file |
215 // End of file |
229 |
216 |