1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_60) on Tue Feb 17 12:25:55 EST 2015 -->
<title>EntityStore (Oracle - Berkeley DB Java API)</title>
<meta name="date" content="2015-02-17">
<link rel="stylesheet" type="text/css" href="../../../style.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="EntityStore (Oracle - Berkeley DB Java API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/EntityStore.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><b>Berkeley DB</b><br><font size="-1"> version 6.1.23</font></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/sleepycat/persist/EntityJoin.html" title="class in com.sleepycat.persist"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/sleepycat/persist/EntityStore.html" target="_top">Frames</a></li>
<li><a href="EntityStore.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.sleepycat.persist</div>
<h2 title="Class EntityStore" class="title">Class EntityStore</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.sleepycat.persist.EntityStore</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">EntityStore</span>
extends java.lang.Object</pre>
<div class="block">A store for managing persistent entity objects.
<p><code>EntityStore</code> objects are thread-safe. Multiple threads may safely
call the methods of a shared <code>EntityStore</code> object.</p>
<p>See the <a href="package-summary.html#example">package
summary example</a> for an example of using an <code>EntityStore</code>.</p>
<p>Before creating an <code>EntityStore</code> you must create an <a href="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db"><code>Environment</code></a> object using the Berkeley DB engine API. The environment may
contain any number of entity stores and their associated databases, as well
as other databases not associated with an entity store.</p>
<p>An entity store is based on an <a href="../../../com/sleepycat/persist/model/EntityModel.html" title="class in com.sleepycat.persist.model"><code>EntityModel</code></a>: a data model which
defines persistent classes (<em>entity classes</em>), primary keys,
secondary keys, and relationships between entities. A primary index is
created for each entity class. An associated secondary index is created for
each secondary key. The <a href="../../../com/sleepycat/persist/model/Entity.html" title="annotation in com.sleepycat.persist.model"><code>Entity</code></a>, <a href="../../../com/sleepycat/persist/model/PrimaryKey.html" title="annotation in com.sleepycat.persist.model"><code>PrimaryKey</code></a> and <a href="../../../com/sleepycat/persist/model/SecondaryKey.html" title="annotation in com.sleepycat.persist.model"><code>SecondaryKey</code></a> annotations may be used to define entities and keys.</p>
<p>To use an <code>EntityStore</code>, first obtain <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><code>PrimaryIndex</code></a> and
<a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><code>SecondaryIndex</code></a> objects by calling <a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryIndex(java.lang.Class,%20java.lang.Class)"><code>getPrimaryIndex</code></a> and <a href="../../../com/sleepycat/persist/EntityStore.html#getSecondaryIndex(com.sleepycat.persist.PrimaryIndex,%20java.lang.Class,%20java.lang.String)"><code>getSecondaryIndex</code></a>. Then use
these indices to store and access entity records by key.</p>
<p>Although not normally needed, you can also use the entity store along
with the <a href="../../../com/sleepycat/db/package-summary.html"><code>Base API</code></a>. Methods in the <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><code>PrimaryIndex</code></a> and <a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><code>SecondaryIndex</code></a> classes may be used to obtain
databases and bindings. The databases may be used directly for accessing
entity records. The bindings should be called explicitly to translate
between <a href="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> objects and entity model
objects.</p>
<p>Each primary and secondary index is associated internally with a <a href="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db"><code>Database</code></a>. With any of the above mentioned use cases, methods are provided
that may be used for database performance tuning. The <a href="../../../com/sleepycat/persist/EntityStore.html#setPrimaryConfig(java.lang.Class,%20com.sleepycat.db.DatabaseConfig)"><code>setPrimaryConfig</code></a> and <a href="../../../com/sleepycat/persist/EntityStore.html#setSecondaryConfig(java.lang.Class,%20java.lang.String,%20com.sleepycat.db.SecondaryConfig)"><code>setSecondaryConfig</code></a> methods may be called anytime before a database is
opened via <a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryIndex(java.lang.Class,%20java.lang.Class)"><code>getPrimaryIndex</code></a> or <a href="../../../com/sleepycat/persist/EntityStore.html#getSecondaryIndex(com.sleepycat.persist.PrimaryIndex,%20java.lang.Class,%20java.lang.String)"><code>getSecondaryIndex</code></a>. The <a href="../../../com/sleepycat/persist/EntityStore.html#setSequenceConfig(java.lang.String,%20com.sleepycat.db.SequenceConfig)"><code>setSequenceConfig</code></a> method may be called anytime before <a href="../../../com/sleepycat/persist/EntityStore.html#getSequence(java.lang.String)"><code>getSequence</code></a> is called or <a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryIndex(java.lang.Class,%20java.lang.Class)"><code>getPrimaryIndex</code></a> is called
for a primary index associated with that sequence.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#EntityStore(com.sleepycat.db.Environment,%20java.lang.String,%20com.sleepycat.persist.StoreConfig)">EntityStore</a></strong>(<a href="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</a> env,
java.lang.String storeName,
<a href="../../../com/sleepycat/persist/StoreConfig.html" title="class in com.sleepycat.persist">StoreConfig</a> config)</code>
<div class="block">Opens an entity store in a given environment.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#close()">close</a></strong>()</code>
<div class="block">Closes all databases and sequences that were opened via this store.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#closeClass(java.lang.Class)">closeClass</a></strong>(java.lang.Class entityClass)</code>
<div class="block">Closes the primary and secondary databases for the given entity class
that were opened via this store.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/evolve/EvolveStats.html" title="class in com.sleepycat.persist.evolve">EvolveStats</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#evolve(com.sleepycat.persist.evolve.EvolveConfig)">evolve</a></strong>(<a href="../../../com/sleepycat/persist/evolve/EvolveConfig.html" title="class in com.sleepycat.persist.evolve">EvolveConfig</a> config)</code>
<div class="block">Performs conversion of unevolved objects in order to reduce lazy
conversion overhead.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/StoreConfig.html" title="class in com.sleepycat.persist">StoreConfig</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getConfig()">getConfig</a></strong>()</code>
<div class="block">Returns a copy of the entity store configuration.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getEnvironment()">getEnvironment</a></strong>()</code>
<div class="block">Returns the environment associated with this store.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/model/EntityModel.html" title="class in com.sleepycat.persist.model">EntityModel</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getModel()">getModel</a></strong>()</code>
<div class="block">Returns the current entity model for this store.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/evolve/Mutations.html" title="class in com.sleepycat.persist.evolve">Mutations</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getMutations()">getMutations</a></strong>()</code>
<div class="block">Returns the set of mutations that were configured when the store was
opened, or if none were configured, the set of mutations that were
configured and stored previously.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryConfig(java.lang.Class)">getPrimaryConfig</a></strong>(java.lang.Class entityClass)</code>
<div class="block">Returns the default primary database Berkeley DB engine API
configuration for an entity class.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><PK,E> <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist">PrimaryIndex</a><PK,E></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryIndex(java.lang.Class,%20java.lang.Class)">getPrimaryIndex</a></strong>(java.lang.Class<PK> primaryKeyClass,
java.lang.Class<E> entityClass)</code>
<div class="block">Returns the primary index for a given entity class, opening it if
necessary.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/db/SecondaryConfig.html" title="class in com.sleepycat.db">SecondaryConfig</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getSecondaryConfig(java.lang.Class,%20java.lang.String)">getSecondaryConfig</a></strong>(java.lang.Class entityClass,
java.lang.String keyName)</code>
<div class="block">Returns the default secondary database Berkeley DB engine API
configuration for an entity class and key name.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><SK,PK,E> <a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist">SecondaryIndex</a><SK,PK,E></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getSecondaryIndex(com.sleepycat.persist.PrimaryIndex,%20java.lang.Class,%20java.lang.String)">getSecondaryIndex</a></strong>(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist">PrimaryIndex</a><PK,E> primaryIndex,
java.lang.Class<SK> keyClass,
java.lang.String keyName)</code>
<div class="block">Returns a secondary index for a given primary index and secondary key,
opening it if necessary.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/db/Sequence.html" title="class in com.sleepycat.db">Sequence</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getSequence(java.lang.String)">getSequence</a></strong>(java.lang.String name)</code>
<div class="block">Returns a named sequence for using Berkeley DB engine API directly,
opening it if necessary.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/db/SequenceConfig.html" title="class in com.sleepycat.db">SequenceConfig</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getSequenceConfig(java.lang.String)">getSequenceConfig</a></strong>(java.lang.String name)</code>
<div class="block">Returns the default Berkeley DB engine API configuration for a named key
sequence.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getStoreName()">getStoreName</a></strong>()</code>
<div class="block">Returns the name of this store.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><SK,PK,E1,E2 extends E1> <br><a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist">SecondaryIndex</a><SK,PK,E2></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#getSubclassIndex(com.sleepycat.persist.PrimaryIndex,%20java.lang.Class,%20java.lang.Class,%20java.lang.String)">getSubclassIndex</a></strong>(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist">PrimaryIndex</a><PK,E1> primaryIndex,
java.lang.Class<E2> entitySubclass,
java.lang.Class<SK> keyClass,
java.lang.String keyName)</code>
<div class="block">Returns a secondary index for a secondary key in an entity subclass,
opening it if necessary.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#setPrimaryConfig(java.lang.Class,%20com.sleepycat.db.DatabaseConfig)">setPrimaryConfig</a></strong>(java.lang.Class entityClass,
<a href="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a> config)</code>
<div class="block">Configures the primary database for an entity class using the Berkeley
DB engine API.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#setSecondaryConfig(java.lang.Class,%20java.lang.String,%20com.sleepycat.db.SecondaryConfig)">setSecondaryConfig</a></strong>(java.lang.Class entityClass,
java.lang.String keyName,
<a href="../../../com/sleepycat/db/SecondaryConfig.html" title="class in com.sleepycat.db">SecondaryConfig</a> config)</code>
<div class="block">Configures a secondary database for an entity class and key name using
the Berkeley DB engine API.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#setSequenceConfig(java.lang.String,%20com.sleepycat.db.SequenceConfig)">setSequenceConfig</a></strong>(java.lang.String name,
<a href="../../../com/sleepycat/db/SequenceConfig.html" title="class in com.sleepycat.db">SequenceConfig</a> config)</code>
<div class="block">Configures a named key sequence using the Berkeley DB engine API.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#truncateClass(java.lang.Class)">truncateClass</a></strong>(java.lang.Class entityClass)</code>
<div class="block">Deletes all instances of this entity class and its (non-entity)
subclasses.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/EntityStore.html#truncateClass(com.sleepycat.db.Transaction,%20java.lang.Class)">truncateClass</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a> txn,
java.lang.Class entityClass)</code>
<div class="block">Deletes all instances of this entity class and its (non-entity)
subclasses.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="EntityStore(com.sleepycat.db.Environment, java.lang.String, com.sleepycat.persist.StoreConfig)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>EntityStore</h4>
<pre>public EntityStore(<a href="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</a> env,
java.lang.String storeName,
<a href="../../../com/sleepycat/persist/StoreConfig.html" title="class in com.sleepycat.persist">StoreConfig</a> config)
throws <a href="../../../com/sleepycat/persist/StoreExistsException.html" title="class in com.sleepycat.persist">StoreExistsException</a>,
<a href="../../../com/sleepycat/persist/StoreNotFoundException.html" title="class in com.sleepycat.persist">StoreNotFoundException</a>,
<a href="../../../com/sleepycat/persist/evolve/IncompatibleClassException.html" title="class in com.sleepycat.persist.evolve">IncompatibleClassException</a>,
<a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Opens an entity store in a given environment.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>env</code> - an open Berkeley DB Environment.</dd><dd><code>storeName</code> - the name of the entity store within the given
environment. An empty string is allowed. Named stores may be used to
distinguish multiple sets of persistent entities for the same entity
classes in a single environment. Underlying database names are prefixed
with the store name.</dd><dd><code>config</code> - the entity store configuration, or null to use default
configuration properties.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/persist/evolve/IncompatibleClassException.html" title="class in com.sleepycat.persist.evolve">IncompatibleClassException</a></code> - if an incompatible class change has
been made and mutations are not configured for handling the change. See
<a href="../../../com/sleepycat/persist/evolve/package-summary.html"><code>Class Evolution</code></a> for more
information.</dd>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
<dd><code><a href="../../../com/sleepycat/persist/StoreExistsException.html" title="class in com.sleepycat.persist">StoreExistsException</a></code></dd>
<dd><code><a href="../../../com/sleepycat/persist/StoreNotFoundException.html" title="class in com.sleepycat.persist">StoreNotFoundException</a></code></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getEnvironment()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEnvironment</h4>
<pre>public <a href="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</a> getEnvironment()</pre>
<div class="block">Returns the environment associated with this store.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the environment.</dd></dl>
</li>
</ul>
<a name="getConfig()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfig</h4>
<pre>public <a href="../../../com/sleepycat/persist/StoreConfig.html" title="class in com.sleepycat.persist">StoreConfig</a> getConfig()</pre>
<div class="block">Returns a copy of the entity store configuration.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the config.</dd></dl>
</li>
</ul>
<a name="getStoreName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStoreName</h4>
<pre>public java.lang.String getStoreName()</pre>
<div class="block">Returns the name of this store.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the name.</dd></dl>
</li>
</ul>
<a name="getModel()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getModel</h4>
<pre>public <a href="../../../com/sleepycat/persist/model/EntityModel.html" title="class in com.sleepycat.persist.model">EntityModel</a> getModel()</pre>
<div class="block">Returns the current entity model for this store. The current model is
derived from the configured entity model and the live entity class
definitions.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the model.</dd></dl>
</li>
</ul>
<a name="getMutations()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMutations</h4>
<pre>public <a href="../../../com/sleepycat/persist/evolve/Mutations.html" title="class in com.sleepycat.persist.evolve">Mutations</a> getMutations()</pre>
<div class="block">Returns the set of mutations that were configured when the store was
opened, or if none were configured, the set of mutations that were
configured and stored previously.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the mutations.</dd></dl>
</li>
</ul>
<a name="getPrimaryIndex(java.lang.Class, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrimaryIndex</h4>
<pre>public <PK,E> <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist">PrimaryIndex</a><PK,E> getPrimaryIndex(java.lang.Class<PK> primaryKeyClass,
java.lang.Class<E> entityClass)
throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Returns the primary index for a given entity class, opening it if
necessary.
<p>If they are not already open, the primary and secondary databases for
the entity class are created/opened together in a single internal
transaction. When the secondary indices are opened, that can cascade to
open other related primary indices.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>primaryKeyClass</code> - the class of the entity's primary key field, or
the corresponding primitive wrapper class if the primary key field type
is a primitive.</dd><dd><code>entityClass</code> - the entity class for which to open the primary index.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the primary index.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the entity class or classes
referenced by it are not persistent, or the primary key class does not
match the entity's primary key field, or if metadata for the entity or
primary key is invalid.</dd>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="getSecondaryIndex(com.sleepycat.persist.PrimaryIndex, java.lang.Class, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSecondaryIndex</h4>
<pre>public <SK,PK,E> <a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist">SecondaryIndex</a><SK,PK,E> getSecondaryIndex(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist">PrimaryIndex</a><PK,E> primaryIndex,
java.lang.Class<SK> keyClass,
java.lang.String keyName)
throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Returns a secondary index for a given primary index and secondary key,
opening it if necessary.
<p><em>NOTE:</em> If the secondary key field is declared in a subclass
of the entity class, use <a href="../../../com/sleepycat/persist/EntityStore.html#getSubclassIndex(com.sleepycat.persist.PrimaryIndex,%20java.lang.Class,%20java.lang.Class,%20java.lang.String)"><code>getSubclassIndex(com.sleepycat.persist.PrimaryIndex<PK, E1>, java.lang.Class<E2>, java.lang.Class<SK>, java.lang.String)</code></a> instead.</p>
<p>If a <a href="../../../com/sleepycat/persist/model/SecondaryKey.html#relatedEntity()"><code>SecondaryKey.relatedEntity()</code></a> is used and the primary index
for the related entity is not already open, it will be opened by this
method. That will, in turn, open its secondary indices, which can
cascade to open other primary indices.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>primaryIndex</code> - the primary index associated with the returned
secondary index. The entity class of the primary index, or one of its
superclasses, must contain a secondary key with the given secondary key
class and key name.</dd><dd><code>keyClass</code> - the class of the secondary key field, or the
corresponding primitive wrapper class if the secondary key field type is
a primitive.</dd><dd><code>keyName</code> - the name of the secondary key field, or the <a href="../../../com/sleepycat/persist/model/SecondaryKey.html#name()"><code>SecondaryKey.name()</code></a> if this name annotation property was specified.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the secondary index.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the entity class or one of its
superclasses does not contain a key field of the given key class and key
name, or if the metadata for the secondary key is invalid.</dd>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="getSubclassIndex(com.sleepycat.persist.PrimaryIndex, java.lang.Class, java.lang.Class, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSubclassIndex</h4>
<pre>public <SK,PK,E1,E2 extends E1> <a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist">SecondaryIndex</a><SK,PK,E2> getSubclassIndex(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist">PrimaryIndex</a><PK,E1> primaryIndex,
java.lang.Class<E2> entitySubclass,
java.lang.Class<SK> keyClass,
java.lang.String keyName)
throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Returns a secondary index for a secondary key in an entity subclass,
opening it if necessary.
<p>If a <a href="../../../com/sleepycat/persist/model/SecondaryKey.html#relatedEntity()"><code>SecondaryKey.relatedEntity()</code></a> is used and the primary index
for the related entity is not already open, it will be opened by this
method. That will, in turn, open its secondary indices, which can
cascade to open other primary indices.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>primaryIndex</code> - the primary index associated with the returned
secondary index. The entity class of the primary index, or one of its
superclasses, must contain a secondary key with the given secondary key
class and key name.</dd><dd><code>entitySubclass</code> - a subclass of the entity class for the primary
index. The entity subclass must contain a secondary key with the given
secondary key class and key name.</dd><dd><code>keyClass</code> - the class of the secondary key field, or the
corresponding primitive wrapper class if the secondary key field type is
a primitive.</dd><dd><code>keyName</code> - the name of the secondary key field, or the <a href="../../../com/sleepycat/persist/model/SecondaryKey.html#name()"><code>SecondaryKey.name()</code></a> if this name annotation property was specified.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the secondary index.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the given entity subclass does not
contain a key field of the given key class and key name, or if the
metadata for the secondary key is invalid.</dd>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="evolve(com.sleepycat.persist.evolve.EvolveConfig)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evolve</h4>
<pre>public <a href="../../../com/sleepycat/persist/evolve/EvolveStats.html" title="class in com.sleepycat.persist.evolve">EvolveStats</a> evolve(<a href="../../../com/sleepycat/persist/evolve/EvolveConfig.html" title="class in com.sleepycat.persist.evolve">EvolveConfig</a> config)
throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Performs conversion of unevolved objects in order to reduce lazy
conversion overhead. Evolution may be performed concurrently with
normal access to the store.
<p>Conversion is performed one entity class at a time. An entity class
is converted only if it has <a href="../../../com/sleepycat/persist/evolve/Mutations.html" title="class in com.sleepycat.persist.evolve"><code>Mutations</code></a> associated with it via
<a href="../../../com/sleepycat/persist/StoreConfig.html#setMutations(com.sleepycat.persist.evolve.Mutations)"><code>StoreConfig.setMutations</code></a>.</p>
<p>Conversion of an entity class is performed by reading each entity,
converting it if necessary, and updating it if conversion was performed.
When all instances of an entity class are converted, references to the
appropriate <a href="../../../com/sleepycat/persist/evolve/Mutations.html" title="class in com.sleepycat.persist.evolve"><code>Mutations</code></a> are deleted. Therefore, if this method is
called twice successfully without changing class definitions, the second
call will do nothing.</p></div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/sleepycat/persist/evolve/package-summary.html"><code>Class Evolution</code></a></dd></dl>
</li>
</ul>
<a name="truncateClass(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncateClass</h4>
<pre>public void truncateClass(java.lang.Class entityClass)
throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Deletes all instances of this entity class and its (non-entity)
subclasses.
<p>The primary database for the given entity class will be truncated and
all secondary databases will be removed. The primary and secondary
databases associated with the entity class must not be open except by
this store, since database truncation/removal is only possible when the
database is not open.</p>
<p>The primary and secondary databases for the entity class will be
closed by this operation and the existing <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><code>PrimaryIndex</code></a> and
<a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><code>SecondaryIndex</code></a> objects will be invalidated. To access the
indexes, the user must call <a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryIndex(java.lang.Class,%20java.lang.Class)"><code>getPrimaryIndex(java.lang.Class<PK>, java.lang.Class<E>)</code></a> and <a href="../../../com/sleepycat/persist/EntityStore.html#getSecondaryIndex(com.sleepycat.persist.PrimaryIndex,%20java.lang.Class,%20java.lang.String)"><code>getSecondaryIndex(com.sleepycat.persist.PrimaryIndex<PK, E>, java.lang.Class<SK>, java.lang.String)</code></a> after this operation is complete.</p>
<p>Auto-commit is used implicitly if the store is transactional.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entityClass</code> - the entity class whose instances are to be deleted.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="truncateClass(com.sleepycat.db.Transaction, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncateClass</h4>
<pre>public void truncateClass(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a> txn,
java.lang.Class entityClass)
throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Deletes all instances of this entity class and its (non-entity)
subclasses.
<p>The primary database for the given entity class will be truncated and
all secondary databases will be removed. The primary and secondary
databases associated with the entity class must not be open except by
this store, since database truncation/removal is only possible when the
database is not open.</p>
<p>The primary and secondary databases for the entity class will be
closed by this operation and the existing <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><code>PrimaryIndex</code></a> and
<a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><code>SecondaryIndex</code></a> objects will be invalidated. To access the
indexes, the user must call <a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryIndex(java.lang.Class,%20java.lang.Class)"><code>getPrimaryIndex(java.lang.Class<PK>, java.lang.Class<E>)</code></a> and <a href="../../../com/sleepycat/persist/EntityStore.html#getSecondaryIndex(com.sleepycat.persist.PrimaryIndex,%20java.lang.Class,%20java.lang.String)"><code>getSecondaryIndex(com.sleepycat.persist.PrimaryIndex<PK, E>, java.lang.Class<SK>, java.lang.String)</code></a> after this operation is complete.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>txn</code> - the transaction used to protect this operation, null to use
auto-commit, or null if the store is non-transactional.</dd><dd><code>entityClass</code> - the entity class whose instances are to be deleted.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="closeClass(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeClass</h4>
<pre>public void closeClass(java.lang.Class entityClass)
throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Closes the primary and secondary databases for the given entity class
that were opened via this store. The caller must ensure that the
primary and secondary indices for the entity class are no longer in
use.
<p>The primary and secondary databases for the entity class will be
closed by this operation and the existing <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><code>PrimaryIndex</code></a> and
<a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><code>SecondaryIndex</code></a> objects will be invalidated. To access the
indexes, the user must call <a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryIndex(java.lang.Class,%20java.lang.Class)"><code>getPrimaryIndex(java.lang.Class<PK>, java.lang.Class<E>)</code></a> and <a href="../../../com/sleepycat/persist/EntityStore.html#getSecondaryIndex(com.sleepycat.persist.PrimaryIndex,%20java.lang.Class,%20java.lang.String)"><code>getSecondaryIndex(com.sleepycat.persist.PrimaryIndex<PK, E>, java.lang.Class<SK>, java.lang.String)</code></a> after this operation is complete.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entityClass</code> - the entity class whose databases are to be closed.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public void close()
throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Closes all databases and sequences that were opened via this store. The
caller must ensure that no databases opened via this store are in use.
<p>WARNING: To guard against memory leaks, the application should
discard all references to the closed handle. While BDB makes an effort
to discard references from closed objects to the allocated memory for an
environment, this behavior is not guaranteed. The safe course of action
for an application is to discard all references to closed BDB
objects.</p></div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="getSequence(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSequence</h4>
<pre>public <a href="../../../com/sleepycat/db/Sequence.html" title="class in com.sleepycat.db">Sequence</a> getSequence(java.lang.String name)
throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Returns a named sequence for using Berkeley DB engine API directly,
opening it if necessary.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the sequence name, which is normally defined using the
<a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence()"><code>PrimaryKey.sequence()</code></a> annotation property.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the open sequence for the given sequence name.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="getSequenceConfig(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSequenceConfig</h4>
<pre>public <a href="../../../com/sleepycat/db/SequenceConfig.html" title="class in com.sleepycat.db">SequenceConfig</a> getSequenceConfig(java.lang.String name)</pre>
<div class="block">Returns the default Berkeley DB engine API configuration for a named key
sequence.
</p>The returned configuration is as follows. All other properties have
default values.</p>
<ul>
<li>The <a href="../../../com/sleepycat/db/SequenceConfig.html#setInitialValue(long)"><code>InitialValue</code></a> is one.</li>
<li>The <a href="../../../com/sleepycat/db/SequenceConfig.html#setRange(long,%20long)"><code>Range</code></a> minimum is one.</li>
<li>The <a href="../../../com/sleepycat/db/SequenceConfig.html#setCacheSize(int)"><code>CacheSize</code></a> is 100.</li>
<li><a href="../../../com/sleepycat/db/SequenceConfig.html#setAutoCommitNoSync(boolean)"><code>AutoCommitNoSync</code></a> is
true.</li>
<li><a href="../../../com/sleepycat/db/SequenceConfig.html#setAllowCreate(boolean)"><code>AllowCreate</code></a> is set to the
inverse of the store <a href="../../../com/sleepycat/persist/StoreConfig.html#setReadOnly(boolean)"><code>ReadOnly</code></a>.
setting.</li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the sequence name, which is normally defined using the
<a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence()"><code>PrimaryKey.sequence()</code></a> annotation property.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the default configuration for the given sequence name.</dd></dl>
</li>
</ul>
<a name="setSequenceConfig(java.lang.String, com.sleepycat.db.SequenceConfig)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSequenceConfig</h4>
<pre>public void setSequenceConfig(java.lang.String name,
<a href="../../../com/sleepycat/db/SequenceConfig.html" title="class in com.sleepycat.db">SequenceConfig</a> config)</pre>
<div class="block">Configures a named key sequence using the Berkeley DB engine API.
<p>To be compatible with the entity model and the Direct Persistence
Layer, the configuration should be retrieved using <a href="../../../com/sleepycat/persist/EntityStore.html#getSequenceConfig(java.lang.String)"><code>getSequenceConfig</code></a>, modified, and then passed to this
method. The following configuration properties may not be changed:</p>
<ul>
<li><a href="../../../com/sleepycat/db/SequenceConfig.html#setExclusiveCreate(boolean)"><code>ExclusiveCreate</code></a></li>
</ul>
<p>In addition, <a href="../../../com/sleepycat/db/SequenceConfig.html#setAllowCreate(boolean)"><code>AllowCreate</code></a> must be
the inverse of <code>ReadOnly</code></p>
<p>If the range is changed to include the value zero, see <a href="../../../com/sleepycat/persist/model/PrimaryKey.html" title="annotation in com.sleepycat.persist.model"><code>PrimaryKey</code></a> for restrictions.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the sequence name, which is normally defined using the
<a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence()"><code>PrimaryKey.sequence()</code></a> annotation property.</dd><dd><code>config</code> - the configuration to use for the given sequence name.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the configuration is incompatible
with the entity model or the Direct Persistence Layer.</dd>
<dd><code>java.lang.IllegalStateException</code> - if the sequence has already been opened.</dd></dl>
</li>
</ul>
<a name="getPrimaryConfig(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrimaryConfig</h4>
<pre>public <a href="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a> getPrimaryConfig(java.lang.Class entityClass)</pre>
<div class="block">Returns the default primary database Berkeley DB engine API
configuration for an entity class.
</p>The returned configuration is as follows. All other properties have
default values.</p>
<ul>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setTransactional(boolean)"><code>Transactional</code></a> is set to
match <a href="../../../com/sleepycat/persist/StoreConfig.html#setTransactional(boolean)"><code>StoreConfig</code></a>.</li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setAllowCreate(boolean)"><code>AllowCreate</code></a> is set to the
inverse of the store <a href="../../../com/sleepycat/persist/StoreConfig.html#setReadOnly(boolean)"><code>ReadOnly</code></a>.
setting.</li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setReadOnly(boolean)"><code>ReadOnly</code></a> is set to match
<a href="../../../com/sleepycat/persist/StoreConfig.html#setReadOnly(boolean)"><code>StoreConfig</code></a>.</li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setBtreeComparator(java.util.Comparator)"><code>BtreeComparator</code></a> is set to
an internal class if a key comparator is used.</li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entityClass</code> - the entity class identifying the primary database.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the default configuration for the given entity class.</dd></dl>
</li>
</ul>
<a name="setPrimaryConfig(java.lang.Class, com.sleepycat.db.DatabaseConfig)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPrimaryConfig</h4>
<pre>public void setPrimaryConfig(java.lang.Class entityClass,
<a href="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a> config)</pre>
<div class="block">Configures the primary database for an entity class using the Berkeley
DB engine API.
<p>To be compatible with the entity model and the Direct Persistence
Layer, the configuration should be retrieved using <a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryConfig(java.lang.Class)"><code>getPrimaryConfig</code></a>, modified, and then passed to this
method. The following configuration properties may not be changed:</p>
<ul>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setExclusiveCreate(boolean)"><code>ExclusiveCreate</code></a></li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setSortedDuplicates(boolean)"><code>SortedDuplicates</code></a></li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setBtreeComparator(java.util.Comparator)"><code>BtreeComparator</code></a></li>
</ul>
<p>In addition, <a href="../../../com/sleepycat/db/DatabaseConfig.html#setAllowCreate(boolean)"><code>AllowCreate</code></a> must be
the inverse of <code>ReadOnly</code></p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entityClass</code> - the entity class identifying the primary database.</dd><dd><code>config</code> - the configuration to use for the given entity class.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the configuration is incompatible
with the entity model or the Direct Persistence Layer.</dd>
<dd><code>java.lang.IllegalStateException</code> - if the database has already been opened.</dd></dl>
</li>
</ul>
<a name="getSecondaryConfig(java.lang.Class, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSecondaryConfig</h4>
<pre>public <a href="../../../com/sleepycat/db/SecondaryConfig.html" title="class in com.sleepycat.db">SecondaryConfig</a> getSecondaryConfig(java.lang.Class entityClass,
java.lang.String keyName)</pre>
<div class="block">Returns the default secondary database Berkeley DB engine API
configuration for an entity class and key name.
</p>The returned configuration is as follows. All other properties have
default values.</p>
<ul>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setTransactional(boolean)"><code>Transactional</code></a> is set to
match the primary database.</li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setAllowCreate(boolean)"><code>AllowCreate</code></a> is set to the
inverse of the primary database <a href="../../../com/sleepycat/db/DatabaseConfig.html#setReadOnly(boolean)"><code>ReadOnly</code></a> setting.</li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setReadOnly(boolean)"><code>ReadOnly</code></a> is set to match
the primary database.</li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setBtreeComparator(java.util.Comparator)"><code>BtreeComparator</code></a> is set to
an internal class if a key comparator is used.</li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setSortedDuplicates(boolean)"><code>SortedDuplicates</code></a> is set
according to <a href="../../../com/sleepycat/persist/model/SecondaryKey.html#relate()"><code>SecondaryKey.relate()</code></a>.</p>
<li><a href="../../../com/sleepycat/db/SecondaryConfig.html#setAllowPopulate(boolean)"><code>AllowPopulate</code></a> is set to
true when a secondary key is added to an existing primary index.</li>
<li><a href="../../../com/sleepycat/db/SecondaryConfig.html#setKeyCreator(com.sleepycat.db.SecondaryKeyCreator)"><code>KeyCreator</code></a> or <a href="../../../com/sleepycat/db/SecondaryConfig.html#setMultiKeyCreator(com.sleepycat.db.SecondaryMultiKeyCreator)"><code>MultiKeyCreator</code></a> is set to an
internal instance.</p>
<li><a href="../../../com/sleepycat/db/SecondaryConfig.html#setForeignMultiKeyNullifier(com.sleepycat.db.ForeignMultiKeyNullifier)"><code>ForeignMultiKeyNullifier</code></a> is set to an internal instance if <a href="../../../com/sleepycat/persist/model/SecondaryKey.html#onRelatedEntityDelete()"><code>SecondaryKey.onRelatedEntityDelete()</code></a> is <a href="../../../com/sleepycat/persist/model/DeleteAction.html#NULLIFY"><code>DeleteAction.NULLIFY</code></a>.</li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entityClass</code> - the entity class containing the given secondary key
name.</dd><dd><code>keyName</code> - the name of the secondary key field, or the <a href="../../../com/sleepycat/persist/model/SecondaryKey.html#name()"><code>SecondaryKey.name()</code></a> if this name annotation property was specified.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the default configuration for the given secondary key.</dd></dl>
</li>
</ul>
<a name="setSecondaryConfig(java.lang.Class, java.lang.String, com.sleepycat.db.SecondaryConfig)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setSecondaryConfig</h4>
<pre>public void setSecondaryConfig(java.lang.Class entityClass,
java.lang.String keyName,
<a href="../../../com/sleepycat/db/SecondaryConfig.html" title="class in com.sleepycat.db">SecondaryConfig</a> config)</pre>
<div class="block">Configures a secondary database for an entity class and key name using
the Berkeley DB engine API.
<p>To be compatible with the entity model and the Direct Persistence
Layer, the configuration should be retrieved using <a href="../../../com/sleepycat/persist/EntityStore.html#getSecondaryConfig(java.lang.Class,%20java.lang.String)"><code>getSecondaryConfig</code></a>, modified, and then passed to
this method. The following configuration properties may not be
changed:</p>
<ul>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setExclusiveCreate(boolean)"><code>ExclusiveCreate</code></a></li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setSortedDuplicates(boolean)"><code>SortedDuplicates</code></a></li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setBtreeComparator(java.util.Comparator)"><code>BtreeComparator</code></a></li>
<li><a href="../../../com/sleepycat/db/DatabaseConfig.html#setDuplicateComparator(java.util.Comparator)"><code>DuplicateComparator</code></a></li>
<li><a href="../../../com/sleepycat/db/SecondaryConfig.html#setAllowPopulate(boolean)"><code>AllowPopulate</code></a></li>
<li><a href="../../../com/sleepycat/db/SecondaryConfig.html#setKeyCreator(com.sleepycat.db.SecondaryKeyCreator)"><code>KeyCreator</code></a></li>
<li><a href="../../../com/sleepycat/db/SecondaryConfig.html#setMultiKeyCreator(com.sleepycat.db.SecondaryMultiKeyCreator)"><code>MultiKeyCreator</code></a></li>
<li><a href="../../../com/sleepycat/db/SecondaryConfig.html#setForeignKeyNullifier(com.sleepycat.db.ForeignKeyNullifier)"><code>ForeignKeyNullifier</code></a></li>
<li><a href="../../../com/sleepycat/db/SecondaryConfig.html#setForeignMultiKeyNullifier(com.sleepycat.db.ForeignMultiKeyNullifier)"><code>ForeignMultiKeyNullifier</code></a></li>
<li><a href="../../../com/sleepycat/db/SecondaryConfig.html#setForeignKeyDeleteAction(com.sleepycat.db.ForeignKeyDeleteAction)"><code>ForeignKeyDeleteAction</code></a></li>
<li><a href="../../../com/sleepycat/db/SecondaryConfig.html#setForeignKeyDatabase(com.sleepycat.db.Database)"><code>ForeignKeyDatabase</code></a></li>
</ul>
<p>In addition, <a href="../../../com/sleepycat/db/DatabaseConfig.html#setAllowCreate(boolean)"><code>AllowCreate</code></a> must be
the inverse of <code>ReadOnly</code></p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entityClass</code> - the entity class containing the given secondary key
name.</dd><dd><code>keyName</code> - the name of the secondary key field, or the <a href="../../../com/sleepycat/persist/model/SecondaryKey.html#name()"><code>SecondaryKey.name()</code></a> if this name annotation property was specified.</dd><dd><code>config</code> - the configuration to use for the given secondary key.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the configuration is incompatible
with the entity model or the Direct Persistence Layer.</dd>
<dd><code>java.lang.IllegalStateException</code> - if the database has already been opened.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/EntityStore.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><b>Berkeley DB</b><br><font size="-1"> version 6.1.23</font></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/sleepycat/persist/EntityJoin.html" title="class in com.sleepycat.persist"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/sleepycat/persist/EntityStore.html" target="_top">Frames</a></li>
<li><a href="EntityStore.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size=1>Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.</font></small></p>
</body>
</html>
|