|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-2D93660B-8206-5D20-85F5-6FFCF4549127" xml:lang="en"><title>Persistent |
|
13 stores</title><shortdesc>A store is persistent if you can close it, re-open it, and then |
|
14 gain access to the same data.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
15 <p>A persistent store has the concept of a root stream. The root stream is, |
|
16 in effect, the starting point from which all others streams within the store |
|
17 can be found.</p> |
|
18 <p>Before closing a persistent store you have created, you must set the ID |
|
19 of the root stream. After you have opened the persistent store, the first |
|
20 thing you must do is look up the root stream ID. You can then open the root |
|
21 stream and start reading data from the store.</p> |
|
22 <p>Persistent stores are represented by the abstract class <codeph>CPersistentStore</codeph>. |
|
23 This class, derived from <codeph>CStreamStore</codeph> has the root stream |
|
24 ID and expands on the abstract framework provided by <codeph>CStreamStore</codeph>, |
|
25 by adding behaviour for setting and retrieving the root stream ID.</p> |
|
26 <p>File stores are an example of persistent stores.</p> |
|
27 <p>The following diagram shows the idea of a persistent store with a root |
|
28 stream:</p> |
|
29 <fig id="GUID-8A987703-9602-563A-97D9-6DD6012708C4"> |
|
30 <title>Persistent store with a root stream</title> |
|
31 <image href="GUID-FD503B6E-889C-521F-B61A-0EBDCA8CD9AC_d0e361365_href.png" placement="inline"/> |
|
32 </fig> |
|
33 <section id="GUID-DD8F38F5-503A-46A5-AF28-74A1DE08E867"><title>See also</title> <p><xref href="GUID-C9D8D913-C65F-5A69-A606-30F59BFB38E2.dita">File |
|
34 stores</xref> </p> </section> |
|
35 </conbody></concept> |