<!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_0) on Wed Dec 30 04:50:33 EST 2009 --> <TITLE> ClassMetadata </TITLE> <META NAME="date" CONTENT="2009-12-30"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="ClassMetadata"; } } </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="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> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/sleepycat/persist/model/ClassEnhancer.html" title="class in com.sleepycat.persist.model"><B>PREV CLASS</B></A> <A HREF="../../../../com/sleepycat/persist/model/DeleteAction.html" title="enum 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/ClassMetadata.html" target="_top"><B>FRAMES</B></A> <A HREF="ClassMetadata.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 ClassMetadata</H2> <PRE> java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.persist.model.ClassMetadata</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD> </DL> <HR> <DL> <DT><PRE>public class <B>ClassMetadata</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL> </PRE> <P> The metadata for a persistent class. A persistent class may be specified with the <A HREF="../../../../com/sleepycat/persist/model/Entity.html" title="annotation in com.sleepycat.persist.model"><CODE>Entity</CODE></A> or <A HREF="../../../../com/sleepycat/persist/model/Persistent.html" title="annotation in com.sleepycat.persist.model"><CODE>Persistent</CODE></A> annotation. <p><code>ClassMetadata</code> objects are thread-safe. Multiple threads may safely call the methods of a shared <code>ClassMetadata</code> object.</p> <p>This and other metadata classes are classes rather than interfaces to allow adding properties to the model at a future date without causing incompatibilities. Any such property will be given a default value and its use will be optional.</p> <P> <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#com.sleepycat.persist.model.ClassMetadata">Serialized Form</A></DL> <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/ClassMetadata.html#ClassMetadata(java.lang.String, int, java.lang.String, boolean, com.sleepycat.persist.model.PrimaryKeyMetadata, java.util.Map, java.util.List)">ClassMetadata</A></B>(java.lang.String className, int version, java.lang.String proxiedClassName, boolean entityClass, <A HREF="../../../../com/sleepycat/persist/model/PrimaryKeyMetadata.html" title="class in com.sleepycat.persist.model">PrimaryKeyMetadata</A> primaryKey, java.util.Map<java.lang.String,<A HREF="../../../../com/sleepycat/persist/model/SecondaryKeyMetadata.html" title="class in com.sleepycat.persist.model">SecondaryKeyMetadata</A>> secondaryKeys, java.util.List<<A HREF="../../../../com/sleepycat/persist/model/FieldMetadata.html" title="class in com.sleepycat.persist.model">FieldMetadata</A>> compositeKeyFields)</CODE> <BR> Used by an <code>EntityModel</code> to construct persistent class metadata.</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> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/ClassMetadata.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object other)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/ClassMetadata.html#getClassName()">getClassName</A></B>()</CODE> <BR> Returns the name of the persistent class.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.List<<A HREF="../../../../com/sleepycat/persist/model/FieldMetadata.html" title="class in com.sleepycat.persist.model">FieldMetadata</A>></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/ClassMetadata.html#getCompositeKeyFields()">getCompositeKeyFields</A></B>()</CODE> <BR> Returns an unmodifiable list of metadata for the fields making up a composite key, or null if this is a not a composite key class.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/sleepycat/persist/model/PrimaryKeyMetadata.html" title="class in com.sleepycat.persist.model">PrimaryKeyMetadata</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/ClassMetadata.html#getPrimaryKey()">getPrimaryKey</A></B>()</CODE> <BR> Returns the primary key metadata for a key declared in this class, or null if none is declared.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/ClassMetadata.html#getProxiedClassName()">getProxiedClassName</A></B>()</CODE> <BR> Returns the class name of the proxied class if this class is a <A HREF="../../../../com/sleepycat/persist/model/PersistentProxy.html" title="interface in com.sleepycat.persist.model"><CODE>PersistentProxy</CODE></A>, or null otherwise.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.Map<java.lang.String,<A HREF="../../../../com/sleepycat/persist/model/SecondaryKeyMetadata.html" title="class in com.sleepycat.persist.model">SecondaryKeyMetadata</A>></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/ClassMetadata.html#getSecondaryKeys()">getSecondaryKeys</A></B>()</CODE> <BR> Returns an unmodifiable map of field name to secondary key metadata for all secondary keys declared in this class, or null if no secondary keys are declared in this class.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/ClassMetadata.html#getVersion()">getVersion</A></B>()</CODE> <BR> Returns the version of this persistent class.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/ClassMetadata.html#hashCode()">hashCode</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/sleepycat/persist/model/ClassMetadata.html#isEntityClass()">isEntityClass</A></B>()</CODE> <BR> Returns whether this class is an entity class.</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.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait</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="ClassMetadata(java.lang.String, int, java.lang.String, boolean, com.sleepycat.persist.model.PrimaryKeyMetadata, java.util.Map, java.util.List)"><!-- --></A><H3> ClassMetadata</H3> <PRE> public <B>ClassMetadata</B>(java.lang.String className, int version, java.lang.String proxiedClassName, boolean entityClass, <A HREF="../../../../com/sleepycat/persist/model/PrimaryKeyMetadata.html" title="class in com.sleepycat.persist.model">PrimaryKeyMetadata</A> primaryKey, java.util.Map<java.lang.String,<A HREF="../../../../com/sleepycat/persist/model/SecondaryKeyMetadata.html" title="class in com.sleepycat.persist.model">SecondaryKeyMetadata</A>> secondaryKeys, java.util.List<<A HREF="../../../../com/sleepycat/persist/model/FieldMetadata.html" title="class in com.sleepycat.persist.model">FieldMetadata</A>> compositeKeyFields)</PRE> <DL> <DD>Used by an <code>EntityModel</code> to construct persistent class metadata. <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="getClassName()"><!-- --></A><H3> getClassName</H3> <PRE> public java.lang.String <B>getClassName</B>()</PRE> <DL> <DD>Returns the name of the persistent class. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getVersion()"><!-- --></A><H3> getVersion</H3> <PRE> public int <B>getVersion</B>()</PRE> <DL> <DD>Returns the version of this persistent class. This may be specified using the <A HREF="../../../../com/sleepycat/persist/model/Entity.html#version()"><CODE>Entity.version()</CODE></A> or <A HREF="../../../../com/sleepycat/persist/model/Persistent.html#version()"><CODE>Persistent.version()</CODE></A> annotation. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getProxiedClassName()"><!-- --></A><H3> getProxiedClassName</H3> <PRE> public java.lang.String <B>getProxiedClassName</B>()</PRE> <DL> <DD>Returns the class name of the proxied class if this class is a <A HREF="../../../../com/sleepycat/persist/model/PersistentProxy.html" title="interface in com.sleepycat.persist.model"><CODE>PersistentProxy</CODE></A>, or null otherwise. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="isEntityClass()"><!-- --></A><H3> isEntityClass</H3> <PRE> public boolean <B>isEntityClass</B>()</PRE> <DL> <DD>Returns whether this class is an entity class. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getPrimaryKey()"><!-- --></A><H3> getPrimaryKey</H3> <PRE> public <A HREF="../../../../com/sleepycat/persist/model/PrimaryKeyMetadata.html" title="class in com.sleepycat.persist.model">PrimaryKeyMetadata</A> <B>getPrimaryKey</B>()</PRE> <DL> <DD>Returns the primary key metadata for a key declared in this class, or null if none is declared. This may be specified using the <A HREF="../../../../com/sleepycat/persist/model/PrimaryKey.html" title="annotation in com.sleepycat.persist.model"><CODE>PrimaryKey</CODE></A> annotation. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getSecondaryKeys()"><!-- --></A><H3> getSecondaryKeys</H3> <PRE> public java.util.Map<java.lang.String,<A HREF="../../../../com/sleepycat/persist/model/SecondaryKeyMetadata.html" title="class in com.sleepycat.persist.model">SecondaryKeyMetadata</A>> <B>getSecondaryKeys</B>()</PRE> <DL> <DD>Returns an unmodifiable map of field name to secondary key metadata for all secondary keys declared in this class, or null if no secondary keys are declared in this class. This metadata may be specified using <A HREF="../../../../com/sleepycat/persist/model/SecondaryKey.html" title="annotation in com.sleepycat.persist.model"><CODE>SecondaryKey</CODE></A> annotations. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getCompositeKeyFields()"><!-- --></A><H3> getCompositeKeyFields</H3> <PRE> public java.util.List<<A HREF="../../../../com/sleepycat/persist/model/FieldMetadata.html" title="class in com.sleepycat.persist.model">FieldMetadata</A>> <B>getCompositeKeyFields</B>()</PRE> <DL> <DD>Returns an unmodifiable list of metadata for the fields making up a composite key, or null if this is a not a composite key class. The order of the fields in the returned list determines their stored order and may be specified using the <A HREF="../../../../com/sleepycat/persist/model/KeyField.html" title="annotation in com.sleepycat.persist.model"><CODE>KeyField</CODE></A> annotation. When the composite key class does not implement <CODE>Comparable</CODE>, the order of the fields is the relative sort order. <P> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="equals(java.lang.Object)"><!-- --></A><H3> equals</H3> <PRE> public boolean <B>equals</B>(java.lang.Object other)</PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="hashCode()"><!-- --></A><H3> hashCode</H3> <PRE> public int <B>hashCode</B>()</PRE> <DL> <DD><DL> <DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> </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="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> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/sleepycat/persist/model/ClassEnhancer.html" title="class in com.sleepycat.persist.model"><B>PREV CLASS</B></A> <A HREF="../../../../com/sleepycat/persist/model/DeleteAction.html" title="enum 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/ClassMetadata.html" target="_top"><B>FRAMES</B></A> <A HREF="ClassMetadata.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> </BODY> </HTML>