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.5.0) on Thu May 15 17:17:33 EDT 2008 -->
6<TITLE>
7EntityModel (Oracle - Berkeley DB Java API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="com.sleepycat.persist.model.EntityModel class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="/style.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    parent.document.title="EntityModel (Oracle - Berkeley DB Java API)";
18}
19</SCRIPT>
20<NOSCRIPT>
21</NOSCRIPT>
22
23</HEAD>
24
25<BODY BGCOLOR="white" onload="windowTitle();">
26
27
28<!-- ========= START OF TOP NAVBAR ======= -->
29<A NAME="navbar_top"><!-- --></A>
30<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
32<TR>
33<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34<A NAME="navbar_top_firstrow"><!-- --></A>
35<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36  <TR ALIGN="center" VALIGN="top">
37  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
38  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/EntityModel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
45  </TR>
46</TABLE>
47</TD>
48<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
49<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
50</TD>
51</TR>
52
53<TR>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55&nbsp;<A HREF="/com/sleepycat/persist/model/EntityMetadata.html" title="class in com.sleepycat.persist.model"><B>PREV CLASS</B></A>&nbsp;
56&nbsp;<A HREF="/com/sleepycat/persist/model/FieldMetadata.html" title="class in com.sleepycat.persist.model"><B>NEXT CLASS</B></A></FONT></TD>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58  <A HREF="/index.html?com/sleepycat/persist/model/EntityModel.html" target="_top"><B>FRAMES</B></A>  &nbsp;
59&nbsp;<A HREF="EntityModel.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
60&nbsp;<SCRIPT type="text/javascript">
61  <!--
62  if(window==top) {
63    document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>');
64  }
65  //-->
66</SCRIPT>
67<NOSCRIPT>
68  <A HREF="/allclasses-noframe.html"><B>All Classes</B></A>
69</NOSCRIPT>
70
71
72</FONT></TD>
73</TR>
74<TR>
75<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
76  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
79</TR>
80</TABLE>
81<A NAME="skip-navbar_top"></A>
82<!-- ========= END OF TOP NAVBAR ========= -->
83
84<HR>
85<!-- ======== START OF CLASS DATA ======== -->
86<H2>
87<FONT SIZE="-1">
88com.sleepycat.persist.model</FONT>
89<BR>
90Class EntityModel</H2>
91<PRE>
92<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
93  <IMG SRC="/resources/inherit.gif" ALT="extended by "><B>com.sleepycat.persist.model.EntityModel</B>
94</PRE>
95<DL>
96<DT><B>Direct Known Subclasses:</B> <DD><A HREF="/com/sleepycat/persist/model/AnnotationModel.html" title="class in com.sleepycat.persist.model">AnnotationModel</A></DD>
97</DL>
98<HR>
99<DL>
100<DT><PRE>public abstract class <B>EntityModel</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>
101</PRE>
102
103<P>
104The base class for classes that provide entity model metadata.  An <A HREF="/com/sleepycat/persist/model/EntityModel.html" title="class in com.sleepycat.persist.model"><CODE>EntityModel</CODE></A> defines entity classes, primary keys, secondary keys, and
105 relationships between entities.  For each entity class that is part of the
106 model, a single <A HREF="/com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><CODE>PrimaryIndex</CODE></A> object and zero or more <A HREF="/com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><CODE>SecondaryIndex</CODE></A> objects may be accessed via an <A HREF="/com/sleepycat/persist/EntityStore.html" title="class in com.sleepycat.persist"><CODE>EntityStore</CODE></A>.
107
108 <p>The built-in entity model, the <A HREF="/com/sleepycat/persist/model/AnnotationModel.html" title="class in com.sleepycat.persist.model"><CODE>AnnotationModel</CODE></A>, is based on
109 annotations that are added to entity classes and their key fields.
110 Annotations are used in the examples in this package, and it is expected
111 that annotations will normally be used; most readers should therefore skip
112 to the <A HREF="/com/sleepycat/persist/model/AnnotationModel.html" title="class in com.sleepycat.persist.model"><CODE>AnnotationModel</CODE></A> class.  However, a custom entity model class
113 may define its own metadata.  This can be used to define entity classes and
114 keys using mechanisms other than annotations.</p>
115
116 <p>A concrete entity model class should extend this class and implement the
117 <A HREF="/com/sleepycat/persist/model/EntityModel.html#getClassMetadata(java.lang.String)"><CODE>getClassMetadata(java.lang.String)</CODE></A>, <A HREF="/com/sleepycat/persist/model/EntityModel.html#getEntityMetadata(java.lang.String)"><CODE>getEntityMetadata(java.lang.String)</CODE></A> and <A HREF="/com/sleepycat/persist/model/EntityModel.html#getKnownClasses()"><CODE>getKnownClasses()</CODE></A> methods.</p>
118
119 <p>This is an abstract class rather than an interface to allow adding
120 capabilities to the model at a future date without causing
121 incompatibilities.  For example, a method may be added in the future for
122 returning new information about the model and subclasses may override this
123 method to return the new information.  Any new methods will have default
124 implementations that return default values, and the use of the new
125 information will be optional.</p>
126<P>
127
128<P>
129<HR>
130
131<P>
132
133<!-- ======== CONSTRUCTOR SUMMARY ======== -->
134
135<A NAME="constructor_summary"><!-- --></A>
136<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
137<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
138<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
139<B>Constructor Summary</B></FONT></TH>
140</TR>
141<TR BGCOLOR="white" CLASS="TableRowColor">
142<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
143<CODE>protected </CODE></FONT></TD>
144<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#EntityModel()">EntityModel</A></B>()</CODE>
145
146<BR>
147&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default constructor for use by subclasses.</TD>
148</TR>
149</TABLE>
150&nbsp;
151<!-- ========== METHOD SUMMARY =========== -->
152
153<A NAME="method_summary"><!-- --></A>
154<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
155<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
156<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
157<B>Method Summary</B></FONT></TH>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
161<CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A></CODE></FONT></TD>
162<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#classForName(java.lang.String)">classForName</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className)</CODE>
163
164<BR>
165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calls Class.forName with the current thread context class loader.</TD>
166</TR>
167<TR BGCOLOR="white" CLASS="TableRowColor">
168<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
169<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
170<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#convertRawObject(com.sleepycat.persist.raw.RawObject)">convertRawObject</A></B>(<A HREF="/com/sleepycat/persist/raw/RawObject.html" title="class in com.sleepycat.persist.raw">RawObject</A>&nbsp;raw)</CODE>
171
172<BR>
173&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts a given raw object to a live object according to the current
174 class definitions.</TD>
175</TR>
176<TR BGCOLOR="white" CLASS="TableRowColor">
177<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
178<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="/com/sleepycat/persist/raw/RawType.html" title="interface in com.sleepycat.persist.raw">RawType</A>&gt;</CODE></FONT></TD>
179<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#getAllRawTypeVersions(java.lang.String)">getAllRawTypeVersions</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className)</CODE>
180
181<BR>
182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns all known versions of type information for a given class name,
183 or null if no persistent version of the class is known.</TD>
184</TR>
185<TR BGCOLOR="white" CLASS="TableRowColor">
186<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187<CODE>abstract &nbsp;<A HREF="/com/sleepycat/persist/model/ClassMetadata.html" title="class in com.sleepycat.persist.model">ClassMetadata</A></CODE></FONT></TD>
188<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#getClassMetadata(java.lang.String)">getClassMetadata</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className)</CODE>
189
190<BR>
191&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the metadata for a given persistent class name, including proxy
192 classes and entity classes.</TD>
193</TR>
194<TR BGCOLOR="white" CLASS="TableRowColor">
195<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
196<CODE>abstract &nbsp;<A HREF="/com/sleepycat/persist/model/EntityMetadata.html" title="class in com.sleepycat.persist.model">EntityMetadata</A></CODE></FONT></TD>
197<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#getEntityMetadata(java.lang.String)">getEntityMetadata</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className)</CODE>
198
199<BR>
200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the metadata for a given entity class name.</TD>
201</TR>
202<TR BGCOLOR="white" CLASS="TableRowColor">
203<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
204<CODE>abstract &nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&gt;</CODE></FONT></TD>
205<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#getKnownClasses()">getKnownClasses</A></B>()</CODE>
206
207<BR>
208&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the names of all known persistent classes.</TD>
209</TR>
210<TR BGCOLOR="white" CLASS="TableRowColor">
211<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
212<CODE>&nbsp;<A HREF="/com/sleepycat/persist/raw/RawType.html" title="interface in com.sleepycat.persist.raw">RawType</A></CODE></FONT></TD>
213<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#getRawType(java.lang.String)">getRawType</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className)</CODE>
214
215<BR>
216&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the type information for the current version of a given class,
217 or null if the class is not currently persistent.</TD>
218</TR>
219<TR BGCOLOR="white" CLASS="TableRowColor">
220<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
221<CODE>&nbsp;<A HREF="/com/sleepycat/persist/raw/RawType.html" title="interface in com.sleepycat.persist.raw">RawType</A></CODE></FONT></TD>
222<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#getRawTypeVersion(java.lang.String, int)">getRawTypeVersion</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className,
223                  int&nbsp;version)</CODE>
224
225<BR>
226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the type information for a given version of a given class,
227 or null if the given version of the class is unknown.</TD>
228</TR>
229<TR BGCOLOR="white" CLASS="TableRowColor">
230<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
231<CODE>&nbsp;boolean</CODE></FONT></TD>
232<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#isOpen()">isOpen</A></B>()</CODE>
233
234<BR>
235&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the model is associated with an open store.</TD>
236</TR>
237<TR BGCOLOR="white" CLASS="TableRowColor">
238<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
239<CODE>&nbsp;void</CODE></FONT></TD>
240<TD><CODE><B><A HREF="/com/sleepycat/persist/model/EntityModel.html#registerClass(java.lang.Class)">registerClass</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A>&nbsp;persistentClass)</CODE>
241
242<BR>
243&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers a persistent class, most importantly, a <A HREF="/com/sleepycat/persist/model/PersistentProxy.html" title="interface in com.sleepycat.persist.model"><CODE>PersistentProxy</CODE></A> class.</TD>
244</TR>
245</TABLE>
246&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
247<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
248<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
249<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" title="class or interface in java.lang">Object</A></B></TH>
250</TR>
251<TR BGCOLOR="white" CLASS="TableRowColor">
252<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#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#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#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#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#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#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#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#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#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#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#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
253</TR>
254</TABLE>
255&nbsp;
256<P>
257
258<!-- ========= CONSTRUCTOR DETAIL ======== -->
259
260<A NAME="constructor_detail"><!-- --></A>
261<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
262<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
263<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
264<B>Constructor Detail</B></FONT></TH>
265</TR>
266</TABLE>
267
268<A NAME="EntityModel()"><!-- --></A><H3>
269EntityModel</H3>
270<PRE>
271protected <B>EntityModel</B>()</PRE>
272<DL>
273<DD>The default constructor for use by subclasses.
274<P>
275</DL>
276
277<!-- ============ METHOD DETAIL ========== -->
278
279<A NAME="method_detail"><!-- --></A>
280<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
281<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
282<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
283<B>Method Detail</B></FONT></TH>
284</TR>
285</TABLE>
286
287<A NAME="isOpen()"><!-- --></A><H3>
288isOpen</H3>
289<PRE>
290public final boolean <B>isOpen</B>()</PRE>
291<DL>
292<DD>Returns whether the model is associated with an open store.
293
294 <p>The <A HREF="/com/sleepycat/persist/model/EntityModel.html#registerClass(java.lang.Class)"><CODE>registerClass(java.lang.Class)</CODE></A> method may only be called when the model
295 is not yet open.  Certain other methods may only be called when the
296 model is open:</p>
297 <ul>
298 <li><A HREF="/com/sleepycat/persist/model/EntityModel.html#convertRawObject(com.sleepycat.persist.raw.RawObject)"><CODE>convertRawObject(com.sleepycat.persist.raw.RawObject)</CODE></A></li>
299 <li><A HREF="/com/sleepycat/persist/model/EntityModel.html#getAllRawTypeVersions(java.lang.String)"><CODE>getAllRawTypeVersions(java.lang.String)</CODE></A></li>
300 <li><A HREF="/com/sleepycat/persist/model/EntityModel.html#getRawType(java.lang.String)"><CODE>getRawType(java.lang.String)</CODE></A></li>
301 <li><A HREF="/com/sleepycat/persist/model/EntityModel.html#getRawTypeVersion(java.lang.String, int)"><CODE>getRawTypeVersion(java.lang.String, int)</CODE></A></li>
302 </ul>
303<P>
304<DD><DL>
305</DL>
306</DD>
307</DL>
308<HR>
309
310<A NAME="registerClass(java.lang.Class)"><!-- --></A><H3>
311registerClass</H3>
312<PRE>
313public final void <B>registerClass</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A>&nbsp;persistentClass)</PRE>
314<DL>
315<DD>Registers a persistent class, most importantly, a <A HREF="/com/sleepycat/persist/model/PersistentProxy.html" title="interface in com.sleepycat.persist.model"><CODE>PersistentProxy</CODE></A> class.  Any persistent class may be registered in
316 advance of using it, to avoid the overhead of updating the catalog
317 database when an instance of the class is first stored.  This method
318 <em>must</em> be called to register <A HREF="/com/sleepycat/persist/model/PersistentProxy.html" title="interface in com.sleepycat.persist.model"><CODE>PersistentProxy</CODE></A> classes.
319 This method must be called before opening a store based on this model.
320<P>
321<DD><DL>
322
323<DT><B>Throws:</B>
324<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this method is called for a model that
325 is associated with an open store.
326<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the given class is not persistent
327 or has a different class loader than previously registered classes.</DL>
328</DD>
329</DL>
330<HR>
331
332<A NAME="getClassMetadata(java.lang.String)"><!-- --></A><H3>
333getClassMetadata</H3>
334<PRE>
335public abstract <A HREF="/com/sleepycat/persist/model/ClassMetadata.html" title="class in com.sleepycat.persist.model">ClassMetadata</A> <B>getClassMetadata</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className)</PRE>
336<DL>
337<DD>Returns the metadata for a given persistent class name, including proxy
338 classes and entity classes.
339<P>
340<DD><DL>
341
342<DT><B>Returns:</B><DD>the metadata or null if the class is not persistent or does not
343 exist.</DL>
344</DD>
345</DL>
346<HR>
347
348<A NAME="getEntityMetadata(java.lang.String)"><!-- --></A><H3>
349getEntityMetadata</H3>
350<PRE>
351public abstract <A HREF="/com/sleepycat/persist/model/EntityMetadata.html" title="class in com.sleepycat.persist.model">EntityMetadata</A> <B>getEntityMetadata</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className)</PRE>
352<DL>
353<DD>Returns the metadata for a given entity class name.
354<P>
355<DD><DL>
356
357<DT><B>Returns:</B><DD>the metadata or null if the class is not an entity class or does
358 not exist.</DL>
359</DD>
360</DL>
361<HR>
362
363<A NAME="getKnownClasses()"><!-- --></A><H3>
364getKnownClasses</H3>
365<PRE>
366public abstract <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&gt; <B>getKnownClasses</B>()</PRE>
367<DL>
368<DD>Returns the names of all known persistent classes.  A type becomes known
369 when an instance of the type is stored for the first time or metadata or
370 type information is queried for a specific class name.
371<P>
372<DD><DL>
373
374<DT><B>Returns:</B><DD>an unmodifiable set of class names.
375<DT><B>Throws:</B>
376<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this method is called for a model that
377 is not associated with an open store.</DL>
378</DD>
379</DL>
380<HR>
381
382<A NAME="getRawType(java.lang.String)"><!-- --></A><H3>
383getRawType</H3>
384<PRE>
385public final <A HREF="/com/sleepycat/persist/raw/RawType.html" title="interface in com.sleepycat.persist.raw">RawType</A> <B>getRawType</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className)</PRE>
386<DL>
387<DD>Returns the type information for the current version of a given class,
388 or null if the class is not currently persistent.
389<P>
390<DD><DL>
391<DT><B>Parameters:</B><DD><CODE>className</CODE> - the name of the current version of the class.
392<DT><B>Throws:</B>
393<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this method is called for a model that
394 is not associated with an open store.</DL>
395</DD>
396</DL>
397<HR>
398
399<A NAME="getRawTypeVersion(java.lang.String, int)"><!-- --></A><H3>
400getRawTypeVersion</H3>
401<PRE>
402public final <A HREF="/com/sleepycat/persist/raw/RawType.html" title="interface in com.sleepycat.persist.raw">RawType</A> <B>getRawTypeVersion</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className,
403                                       int&nbsp;version)</PRE>
404<DL>
405<DD>Returns the type information for a given version of a given class,
406 or null if the given version of the class is unknown.
407<P>
408<DD><DL>
409<DT><B>Parameters:</B><DD><CODE>className</CODE> - the name of the latest version of the class.<DD><CODE>version</CODE> - the desired version of the class.
410<DT><B>Throws:</B>
411<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this method is called for a model that
412 is not associated with an open store.</DL>
413</DD>
414</DL>
415<HR>
416
417<A NAME="getAllRawTypeVersions(java.lang.String)"><!-- --></A><H3>
418getAllRawTypeVersions</H3>
419<PRE>
420public final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="/com/sleepycat/persist/raw/RawType.html" title="interface in com.sleepycat.persist.raw">RawType</A>&gt; <B>getAllRawTypeVersions</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className)</PRE>
421<DL>
422<DD>Returns all known versions of type information for a given class name,
423 or null if no persistent version of the class is known.
424<P>
425<DD><DL>
426<DT><B>Parameters:</B><DD><CODE>className</CODE> - the name of the latest version of the class.
427<DT><B>Returns:</B><DD>an unmodifiable list of types for the given class name in order
428 from most recent to least recent.
429<DT><B>Throws:</B>
430<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this method is called for a model that
431 is not associated with an open store.</DL>
432</DD>
433</DL>
434<HR>
435
436<A NAME="convertRawObject(com.sleepycat.persist.raw.RawObject)"><!-- --></A><H3>
437convertRawObject</H3>
438<PRE>
439public final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>convertRawObject</B>(<A HREF="/com/sleepycat/persist/raw/RawObject.html" title="class in com.sleepycat.persist.raw">RawObject</A>&nbsp;raw)</PRE>
440<DL>
441<DD>Converts a given raw object to a live object according to the current
442 class definitions.
443
444 <p>The given raw object must conform to the current class definitions.
445 However, the raw type (<A HREF="/com/sleepycat/persist/raw/RawObject.html#getType()"><CODE>RawObject.getType()</CODE></A>) is allowed to be from
446 a different store, as long as the class names and the value types match.
447 This allows converting raw objects that are read from one store to live
448 objects in another store, for example, in a conversion program.</p>
449<P>
450<DD><DL>
451</DL>
452</DD>
453</DL>
454<HR>
455
456<A NAME="classForName(java.lang.String)"><!-- --></A><H3>
457classForName</H3>
458<PRE>
459public static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> <B>classForName</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;className)
460                          throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassNotFoundException.html" title="class or interface in java.lang">ClassNotFoundException</A></PRE>
461<DL>
462<DD>Calls Class.forName with the current thread context class loader.  This
463 method should be called by entity model implementations instead of
464 calling Class.forName whenever loading an application class.
465<P>
466<DD><DL>
467
468<DT><B>Throws:</B>
469<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassNotFoundException.html" title="class or interface in java.lang">ClassNotFoundException</A></CODE></DL>
470</DD>
471</DL>
472<!-- ========= END OF CLASS DATA ========= -->
473<HR>
474
475
476<!-- ======= START OF BOTTOM NAVBAR ====== -->
477<A NAME="navbar_bottom"><!-- --></A>
478<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
479<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
480<TR>
481<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
482<A NAME="navbar_bottom_firstrow"><!-- --></A>
483<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
484  <TR ALIGN="center" VALIGN="top">
485  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
486  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
487  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
488  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/EntityModel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
489  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
490  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
491  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
492  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
493  </TR>
494</TABLE>
495</TD>
496<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
497<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
498</TD>
499</TR>
500
501<TR>
502<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
503&nbsp;<A HREF="/com/sleepycat/persist/model/EntityMetadata.html" title="class in com.sleepycat.persist.model"><B>PREV CLASS</B></A>&nbsp;
504&nbsp;<A HREF="/com/sleepycat/persist/model/FieldMetadata.html" title="class in com.sleepycat.persist.model"><B>NEXT CLASS</B></A></FONT></TD>
505<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
506  <A HREF="/index.html?com/sleepycat/persist/model/EntityModel.html" target="_top"><B>FRAMES</B></A>  &nbsp;
507&nbsp;<A HREF="EntityModel.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
508&nbsp;<SCRIPT type="text/javascript">
509  <!--
510  if(window==top) {
511    document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>');
512  }
513  //-->
514</SCRIPT>
515<NOSCRIPT>
516  <A HREF="/allclasses-noframe.html"><B>All Classes</B></A>
517</NOSCRIPT>
518
519
520</FONT></TD>
521</TR>
522<TR>
523<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
524  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
525<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
526DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
527</TR>
528</TABLE>
529<A NAME="skip-navbar_bottom"></A>
530<!-- ======== END OF BOTTOM NAVBAR ======= -->
531
532<HR>
533<font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
534</BODY>
535</HTML>
536