<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_03) on Mon Apr 12 16:25:50 EDT 2010 --> <TITLE> AnnotationModel (Oracle - Berkeley DB Java API) </TITLE> <META NAME="date" CONTENT="2010-04-12"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../style.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="AnnotationModel (Oracle - Berkeley DB Java API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AnnotationModel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Berkeley DB</b><br><font size="-1"> version 4.8.30</font></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../../com/sleepycat/persist/model/ClassEnhancer.html" title="class in com.sleepycat.persist.model"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/sleepycat/persist/model/AnnotationModel.html" target="_top"><B>FRAMES</B></A> <A HREF="AnnotationModel.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.sleepycat.persist.model</FONT> <BR> Class AnnotationModel</H2> <PRE> <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> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html" title="class in com.sleepycat.persist.model">com.sleepycat.persist.model.EntityModel</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.persist.model.AnnotationModel</B> </PRE> <HR> <DL> <DT><PRE>public class <B>AnnotationModel</B><DT>extends <A HREF="../../../../com/sleepycat/persist/model/EntityModel.html" title="class in com.sleepycat.persist.model">EntityModel</A></DL> </PRE> <P> The default annotation-based entity model. An <code>AnnotationModel</code> is based on annotations that are specified for entity classes and their key fields. <p><code>AnnotationModel</code> objects are thread-safe. Multiple threads may safely call the methods of a shared <code>AnnotationModel</code> object.</p> <p>The set of persistent classes in the annotation model is the set of all classes with the <A HREF="../../../../com/sleepycat/persist/model/Persistent.html" title="annotation in com.sleepycat.persist.model"><CODE>Persistent</CODE></A> or <A HREF="../../../../com/sleepycat/persist/model/Entity.html" title="annotation in com.sleepycat.persist.model"><CODE>Entity</CODE></A> annotation.</p> <p>The annotations used to define persistent classes are: <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/Persistent.html" title="annotation in com.sleepycat.persist.model"><CODE>Persistent</CODE></A>, <A HREF="../../../../com/sleepycat/persist/model/PrimaryKey.html" title="annotation in com.sleepycat.persist.model"><CODE>PrimaryKey</CODE></A>, <A HREF="../../../../com/sleepycat/persist/model/SecondaryKey.html" title="annotation in com.sleepycat.persist.model"><CODE>SecondaryKey</CODE></A> and <A HREF="../../../../com/sleepycat/persist/model/KeyField.html" title="annotation in com.sleepycat.persist.model"><CODE>KeyField</CODE></A>. A good starting point is <A HREF="../../../../com/sleepycat/persist/model/Entity.html" title="annotation in com.sleepycat.persist.model"><CODE>Entity</CODE></A>.</p> <P> <P> <HR> <P> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/AnnotationModel.html#AnnotationModel()">AnnotationModel</A></B>()</CODE> <BR> Constructs a model for annotated entity classes.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/sleepycat/persist/model/ClassMetadata.html" title="class in com.sleepycat.persist.model">ClassMetadata</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/AnnotationModel.html#getClassMetadata(java.lang.String)">getClassMetadata</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> className)</CODE> <BR> Returns the metadata for a given persistent class name, including proxy classes and entity classes.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/sleepycat/persist/model/EntityMetadata.html" title="class in com.sleepycat.persist.model">EntityMetadata</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/AnnotationModel.html#getEntityMetadata(java.lang.String)">getEntityMetadata</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> className)</CODE> <BR> Returns the metadata for a given entity class name.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A><<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> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/AnnotationModel.html#getKnownClasses()">getKnownClasses</A></B>()</CODE> <BR> Returns the names of all known persistent classes.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.sleepycat.persist.model.EntityModel"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class com.sleepycat.persist.model.<A HREF="../../../../com/sleepycat/persist/model/EntityModel.html" title="class in com.sleepycat.persist.model">EntityModel</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#classForName(java.lang.String)">classForName</A>, <A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#convertRawObject(com.sleepycat.persist.raw.RawObject)">convertRawObject</A>, <A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#getAllRawTypes()">getAllRawTypes</A>, <A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#getAllRawTypeVersions(java.lang.String)">getAllRawTypeVersions</A>, <A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#getRawType(java.lang.String)">getRawType</A>, <A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#getRawTypeVersion(java.lang.String, int)">getRawTypeVersion</A>, <A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#isOpen()">isOpen</A>, <A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#registerClass(java.lang.Class)">registerClass</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <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> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <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> </TR> </TABLE> <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="AnnotationModel()"><!-- --></A><H3> AnnotationModel</H3> <PRE> public <B>AnnotationModel</B>()</PRE> <DL> <DD>Constructs a model for annotated entity classes. <P> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getKnownClasses()"><!-- --></A><H3> getKnownClasses</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A><<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>getKnownClasses</B>()</PRE> <DL> <DD><B>Description copied from class: <CODE><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#getKnownClasses()">EntityModel</A></CODE></B></DD> <DD>Returns the names of all known persistent classes. A type becomes known when an instance of the type is stored for the first time or metadata or type information is queried for a specific class name. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#getKnownClasses()">getKnownClasses</A></CODE> in class <CODE><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html" title="class in com.sleepycat.persist.model">EntityModel</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an unmodifiable set of class names.</DL> </DD> </DL> <HR> <A NAME="getEntityMetadata(java.lang.String)"><!-- --></A><H3> getEntityMetadata</H3> <PRE> public <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?is-external=true" title="class or interface in java.lang">String</A> className)</PRE> <DL> <DD><B>Description copied from class: <CODE><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#getEntityMetadata(java.lang.String)">EntityModel</A></CODE></B></DD> <DD>Returns the metadata for a given entity class name. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#getEntityMetadata(java.lang.String)">getEntityMetadata</A></CODE> in class <CODE><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html" title="class in com.sleepycat.persist.model">EntityModel</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the metadata or null if the class is not an entity class or does not exist.</DL> </DD> </DL> <HR> <A NAME="getClassMetadata(java.lang.String)"><!-- --></A><H3> getClassMetadata</H3> <PRE> public <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?is-external=true" title="class or interface in java.lang">String</A> className)</PRE> <DL> <DD><B>Description copied from class: <CODE><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#getClassMetadata(java.lang.String)">EntityModel</A></CODE></B></DD> <DD>Returns the metadata for a given persistent class name, including proxy classes and entity classes. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html#getClassMetadata(java.lang.String)">getClassMetadata</A></CODE> in class <CODE><A HREF="../../../../com/sleepycat/persist/model/EntityModel.html" title="class in com.sleepycat.persist.model">EntityModel</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the metadata or null if the class is not persistent or does not exist.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AnnotationModel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Berkeley DB</b><br><font size="-1"> version 4.8.30</font></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../../com/sleepycat/persist/model/ClassEnhancer.html" title="class in com.sleepycat.persist.model"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/sleepycat/persist/model/AnnotationModel.html" target="_top"><B>FRAMES</B></A> <A HREF="AnnotationModel.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <font size=1>Copyright (c) 1996-2009 Oracle. All rights reserved.</font> </BODY> </HTML>