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