blob: 11ca2689f72d719c9fc3bcfe9d7f888ec123a456 [file] [log] [blame]
<!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_01) on Tue Mar 18 12:43:12 PDT 2008 -->
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
JDOImplHelper (JDO2 API Legacy 2.1)
</TITLE>
<META NAME="date" CONTENT="2008-03-18">
<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="JDOImplHelper (JDO2 API Legacy 2.1)";
}
}
</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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JDOImplHelper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/jdo/spi/I18NHelper.html" title="class in javax.jdo.spi"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/jdo/spi/JDOImplHelper.StateInterrogationBooleanReturn.html" title="interface in javax.jdo.spi"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?javax/jdo/spi/JDOImplHelper.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JDOImplHelper.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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">
javax.jdo.spi</FONT>
<BR>
Class JDOImplHelper</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.jdo.spi.JDOImplHelper</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>JDOImplHelper</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
This class is a helper class for JDO implementations. It contains methods
to register metadata for persistence-capable classes and to perform common
operations needed by implementations, not by end users.
<P><code>JDOImplHelper</code> allows construction of instances of
persistence-capable classes without using reflection.
<P>Persistence-capable classes register themselves via a static method
at class load time.
There is no security restriction on this access. JDO implementations
get access to the functions provided by this class only if they are
authorized by the security manager. To avoid having every call go through
the security manager, only the call to get an instance is checked. Once an
implementation
has an instance, any of the methods can be invoked without security checks.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>2.1</DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_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>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;interface</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.StateInterrogationBooleanReturn.html" title="interface in javax.jdo.spi">JDOImplHelper.StateInterrogationBooleanReturn</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is an interface used to interrogate the state of an instance
that does not implement PersistenceCapable.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;interface</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.StateInterrogationObjectReturn.html" title="interface in javax.jdo.spi">JDOImplHelper.StateInterrogationObjectReturn</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is an interface used to interrogate the state of an instance
that does not implement PersistenceCapable.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;interface</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.StringConstructor.html" title="interface in javax.jdo.spi">JDOImplHelper.StringConstructor</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct an instance of a key class using a String as input.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#addRegisterClassListener(javax.jdo.spi.RegisterClassListener)">addRegisterClassListener</A></B>(<A HREF="../../../javax/jdo/spi/RegisterClassListener.html" title="interface in javax.jdo.spi">RegisterClassListener</A>&nbsp;crl)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add the specified <code>RegisterClassListener</code> to the listener
list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#addStateInterrogation(javax.jdo.spi.StateInterrogation)">addStateInterrogation</A></B>(<A HREF="../../../javax/jdo/spi/StateInterrogation.html" title="interface in javax.jdo.spi">StateInterrogation</A>&nbsp;si)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a StateInterrogation to the list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#checkAuthorizedStateManager(javax.jdo.spi.StateManager)">checkAuthorizedStateManager</A></B>(<A HREF="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</A>&nbsp;sm)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check that the parameter instance is of a class that is authorized for
JDOPermission("setStateManager").</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#checkAuthorizedStateManagerClass(java.lang.Class)">checkAuthorizedStateManagerClass</A></B>(java.lang.Class&nbsp;smClass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check that the parameter instance is a class that is authorized for
JDOPermission("setStateManager").</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#construct(java.lang.String, java.lang.String)">construct</A></B>(java.lang.String&nbsp;className,
java.lang.String&nbsp;keyString)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct an instance of the parameter class, using the keyString
as an argument to the constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#copyKeyFieldsFromObjectId(java.lang.Class, javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer, java.lang.Object)">copyKeyFieldsFromObjectId</A></B>(java.lang.Class&nbsp;pcClass,
<A HREF="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldConsumer.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldConsumer</A>&nbsp;fm,
java.lang.Object&nbsp;oid)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy fields to an outside source from the key fields in the ObjectId.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#copyKeyFieldsToObjectId(java.lang.Class, javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier, java.lang.Object)">copyKeyFieldsToObjectId</A></B>(java.lang.Class&nbsp;pcClass,
<A HREF="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldSupplier.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldSupplier</A>&nbsp;fm,
java.lang.Object&nbsp;oid)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy fields from an outside source to the key fields in the ObjectId.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#getFieldFlags(java.lang.Class)">getFieldFlags</A></B>(java.lang.Class&nbsp;pcClass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the field flags for a <code>PersistenceCapable</code> class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#getFieldNames(java.lang.Class)">getFieldNames</A></B>(java.lang.Class&nbsp;pcClass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the field names for a <code>PersistenceCapable</code> class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Class[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#getFieldTypes(java.lang.Class)">getFieldTypes</A></B>(java.lang.Class&nbsp;pcClass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the field types for a <code>PersistenceCapable</code> class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../javax/jdo/spi/JDOImplHelper.html" title="class in javax.jdo.spi">JDOImplHelper</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#getInstance()">getInstance</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get an instance of <code>JDOImplHelper</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#getPersistenceCapableSuperclass(java.lang.Class)">getPersistenceCapableSuperclass</A></B>(java.lang.Class&nbsp;pcClass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the persistence-capable superclass for a
<code>PersistenceCapable</code> class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Collection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#getRegisteredClasses()">getRegisteredClasses</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a collection of class objects of the registered
persistence-capable classes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;javax.xml.parsers.DocumentBuilderFactory</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#getRegisteredDocumentBuilderFactory()">getRegisteredDocumentBuilderFactory</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the registered instance of DocumentBuilderFactory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;org.xml.sax.ErrorHandler</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#getRegisteredErrorHandler()">getRegisteredErrorHandler</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the registered instance of ErrorHandler.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/jdo/spi/PersistenceCapable.html" title="interface in javax.jdo.spi">PersistenceCapable</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#newInstance(java.lang.Class, javax.jdo.spi.StateManager)">newInstance</A></B>(java.lang.Class&nbsp;pcClass,
<A HREF="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</A>&nbsp;sm)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of the class and assign its
<code>jdoStateManager</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/jdo/spi/PersistenceCapable.html" title="interface in javax.jdo.spi">PersistenceCapable</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#newInstance(java.lang.Class, javax.jdo.spi.StateManager, java.lang.Object)">newInstance</A></B>(java.lang.Class&nbsp;pcClass,
<A HREF="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</A>&nbsp;sm,
java.lang.Object&nbsp;oid)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of the class and assign its
<code>jdoStateManager</code> and key values from the ObjectId.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#newObjectIdInstance(java.lang.Class)">newObjectIdInstance</A></B>(java.lang.Class&nbsp;pcClass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of the ObjectId class of this
<code>PersistenceCapable</code> class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#newObjectIdInstance(java.lang.Class, java.lang.Object)">newObjectIdInstance</A></B>(java.lang.Class&nbsp;pcClass,
java.lang.Object&nbsp;obj)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new instance of the class used by the parameter Class
for JDO identity, using the
key constructor of the object id class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#nonBinaryCompatibleGet(java.lang.Object, javax.jdo.spi.JDOImplHelper.StateInterrogationObjectReturn)">nonBinaryCompatibleGet</A></B>(java.lang.Object&nbsp;pc,
<A HREF="../../../javax/jdo/spi/JDOImplHelper.StateInterrogationObjectReturn.html" title="interface in javax.jdo.spi">JDOImplHelper.StateInterrogationObjectReturn</A>&nbsp;sibr)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return an object associated with a non-binary-compatible instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#nonBinaryCompatibleIs(java.lang.Object, javax.jdo.spi.JDOImplHelper.StateInterrogationBooleanReturn)">nonBinaryCompatibleIs</A></B>(java.lang.Object&nbsp;pc,
<A HREF="../../../javax/jdo/spi/JDOImplHelper.StateInterrogationBooleanReturn.html" title="interface in javax.jdo.spi">JDOImplHelper.StateInterrogationBooleanReturn</A>&nbsp;sibr)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine the state of a non-binary-compatible instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#nonBinaryCompatibleMakeDirty(java.lang.Object, java.lang.String)">nonBinaryCompatibleMakeDirty</A></B>(java.lang.Object&nbsp;pc,
java.lang.String&nbsp;fieldName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mark a non-binary-compatible instance dirty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#registerAuthorizedStateManagerClass(java.lang.Class)">registerAuthorizedStateManagerClass</A></B>(java.lang.Class&nbsp;smClass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register a class authorized to replaceStateManager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#registerAuthorizedStateManagerClasses(java.util.Collection)">registerAuthorizedStateManagerClasses</A></B>(java.util.Collection&nbsp;smClasses)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register classes authorized to replaceStateManager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#registerClass(java.lang.Class, java.lang.String[], java.lang.Class[], byte[], java.lang.Class, javax.jdo.spi.PersistenceCapable)">registerClass</A></B>(java.lang.Class&nbsp;pcClass,
java.lang.String[]&nbsp;fieldNames,
java.lang.Class[]&nbsp;fieldTypes,
byte[]&nbsp;fieldFlags,
java.lang.Class&nbsp;persistenceCapableSuperclass,
<A HREF="../../../javax/jdo/spi/PersistenceCapable.html" title="interface in javax.jdo.spi">PersistenceCapable</A>&nbsp;pc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register metadata by class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#registerDateFormat(java.text.DateFormat)">registerDateFormat</A></B>(java.text.DateFormat&nbsp;df)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register a DateFormat instance for use with constructing Date
instances.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#registerDocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory)">registerDocumentBuilderFactory</A></B>(javax.xml.parsers.DocumentBuilderFactory&nbsp;factory)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register a DocumentBuilderFactory instance for use in parsing the
resource(s) META-INF/jdoconfig.xml.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#registerErrorHandler(org.xml.sax.ErrorHandler)">registerErrorHandler</A></B>(org.xml.sax.ErrorHandler&nbsp;handler)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register an ErrorHandler instance for use in parsing the
resource(s) META-INF/jdoconfig.xml.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#registerStringConstructor(java.lang.Class, javax.jdo.spi.JDOImplHelper.StringConstructor)">registerStringConstructor</A></B>(java.lang.Class&nbsp;cls,
<A HREF="../../../javax/jdo/spi/JDOImplHelper.StringConstructor.html" title="interface in javax.jdo.spi">JDOImplHelper.StringConstructor</A>&nbsp;sc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Register special StringConstructor instances.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#removeRegisterClassListener(javax.jdo.spi.RegisterClassListener)">removeRegisterClassListener</A></B>(<A HREF="../../../javax/jdo/spi/RegisterClassListener.html" title="interface in javax.jdo.spi">RegisterClassListener</A>&nbsp;crl)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the specified <code>RegisterClassListener</code> from the listener
list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#removeStateInterrogation(javax.jdo.spi.StateInterrogation)">removeStateInterrogation</A></B>(<A HREF="../../../javax/jdo/spi/StateInterrogation.html" title="interface in javax.jdo.spi">StateInterrogation</A>&nbsp;si)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove a StateInterrogation from the list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#unregisterClass(java.lang.Class)">unregisterClass</A></B>(java.lang.Class&nbsp;pcClass)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregister metadata by class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/jdo/spi/JDOImplHelper.html#unregisterClasses(java.lang.ClassLoader)">unregisterClasses</A></B>(java.lang.ClassLoader&nbsp;cl)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregister metadata by class loader.</TD>
</TR>
</TABLE>
&nbsp;<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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ 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="getInstance()"><!-- --></A><H3>
getInstance</H3>
<PRE>
public static <A HREF="../../../javax/jdo/spi/JDOImplHelper.html" title="class in javax.jdo.spi">JDOImplHelper</A> <B>getInstance</B>()
throws java.lang.SecurityException</PRE>
<DL>
<DD>Get an instance of <code>JDOImplHelper</code>. This method
checks that the caller is authorized for
<code>JDOPermission("getMetadata")</code>, and if not, throws
<code>SecurityException</code>.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>an instance of <code>JDOImplHelper</code>.
<DT><B>Throws:</B>
<DD><CODE>java.lang.SecurityException</CODE> - if the caller is not authorized for
JDOPermission("getMetadata").</DL>
</DD>
</DL>
<HR>
<A NAME="getFieldNames(java.lang.Class)"><!-- --></A><H3>
getFieldNames</H3>
<PRE>
public java.lang.String[] <B>getFieldNames</B>(java.lang.Class&nbsp;pcClass)</PRE>
<DL>
<DD>Get the field names for a <code>PersistenceCapable</code> class. The
order of fields is the natural ordering of the <code>String</code> class
(without considering localization).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class.
<DT><B>Returns:</B><DD>the field names for the class.</DL>
</DD>
</DL>
<HR>
<A NAME="getFieldTypes(java.lang.Class)"><!-- --></A><H3>
getFieldTypes</H3>
<PRE>
public java.lang.Class[] <B>getFieldTypes</B>(java.lang.Class&nbsp;pcClass)</PRE>
<DL>
<DD>Get the field types for a <code>PersistenceCapable</code> class. The
order of fields is the same as for field names.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class.
<DT><B>Returns:</B><DD>the field types for the class.</DL>
</DD>
</DL>
<HR>
<A NAME="getFieldFlags(java.lang.Class)"><!-- --></A><H3>
getFieldFlags</H3>
<PRE>
public byte[] <B>getFieldFlags</B>(java.lang.Class&nbsp;pcClass)</PRE>
<DL>
<DD>Get the field flags for a <code>PersistenceCapable</code> class. The
order of fields is the same as for field names.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class.
<DT><B>Returns:</B><DD>the field types for the class.</DL>
</DD>
</DL>
<HR>
<A NAME="getPersistenceCapableSuperclass(java.lang.Class)"><!-- --></A><H3>
getPersistenceCapableSuperclass</H3>
<PRE>
public java.lang.Class <B>getPersistenceCapableSuperclass</B>(java.lang.Class&nbsp;pcClass)</PRE>
<DL>
<DD>Get the persistence-capable superclass for a
<code>PersistenceCapable</code> class.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class.
<DT><B>Returns:</B><DD>The <code>PersistenceCapable</code> superclass for this class,
or <code>null</code> if there isn't one.</DL>
</DD>
</DL>
<HR>
<A NAME="newInstance(java.lang.Class, javax.jdo.spi.StateManager)"><!-- --></A><H3>
newInstance</H3>
<PRE>
public <A HREF="../../../javax/jdo/spi/PersistenceCapable.html" title="interface in javax.jdo.spi">PersistenceCapable</A> <B>newInstance</B>(java.lang.Class&nbsp;pcClass,
<A HREF="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</A>&nbsp;sm)</PRE>
<DL>
<DD>Create a new instance of the class and assign its
<code>jdoStateManager</code>. The new instance has its
<code>jdoFlags</code> set to <code>LOAD_REQUIRED</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class.<DD><CODE>sm</CODE> - the <code>StateManager</code> which will own the new instance.
<DT><B>Returns:</B><DD>the new instance, or <code>null</code> if the class is not
registered.<DT><B>See Also:</B><DD><A HREF="../../../javax/jdo/spi/PersistenceCapable.html#jdoNewInstance(javax.jdo.spi.StateManager)"><CODE>PersistenceCapable.jdoNewInstance(StateManager sm)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="newInstance(java.lang.Class, javax.jdo.spi.StateManager, java.lang.Object)"><!-- --></A><H3>
newInstance</H3>
<PRE>
public <A HREF="../../../javax/jdo/spi/PersistenceCapable.html" title="interface in javax.jdo.spi">PersistenceCapable</A> <B>newInstance</B>(java.lang.Class&nbsp;pcClass,
<A HREF="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</A>&nbsp;sm,
java.lang.Object&nbsp;oid)</PRE>
<DL>
<DD>Create a new instance of the class and assign its
<code>jdoStateManager</code> and key values from the ObjectId. If the
oid parameter is <code>null</code>, no key values are copied.
The new instance has its <code>jdoFlags</code> set to
<code>LOAD_REQUIRED</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class.<DD><CODE>sm</CODE> - the <code>StateManager</code> which will own the new instance.<DD><CODE>oid</CODE> - the ObjectId instance from which to copy key field values.
<DT><B>Returns:</B><DD>the new instance, or <code>null</code> if the class is not
registered.<DT><B>See Also:</B><DD><A HREF="../../../javax/jdo/spi/PersistenceCapable.html#jdoNewInstance(javax.jdo.spi.StateManager, java.lang.Object)"><CODE>PersistenceCapable.jdoNewInstance(StateManager sm, Object oid)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="newObjectIdInstance(java.lang.Class)"><!-- --></A><H3>
newObjectIdInstance</H3>
<PRE>
public java.lang.Object <B>newObjectIdInstance</B>(java.lang.Class&nbsp;pcClass)</PRE>
<DL>
<DD>Create a new instance of the ObjectId class of this
<code>PersistenceCapable</code> class.
It is intended only for application identity. This method should
not be called for classes that use single field identity;
newObjectIdInstance(Class, Object) should be used instead.
If the class has been
enhanced for datastore identity, or if the class is abstract,
null is returned.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class.
<DT><B>Returns:</B><DD>the new ObjectId instance, or <code>null</code> if the class
is not registered.</DL>
</DD>
</DL>
<HR>
<A NAME="newObjectIdInstance(java.lang.Class, java.lang.Object)"><!-- --></A><H3>
newObjectIdInstance</H3>
<PRE>
public java.lang.Object <B>newObjectIdInstance</B>(java.lang.Class&nbsp;pcClass,
java.lang.Object&nbsp;obj)</PRE>
<DL>
<DD>Create a new instance of the class used by the parameter Class
for JDO identity, using the
key constructor of the object id class. It is intended for single
field identity. The identity
instance returned has no relationship with the values of the primary key
fields of the persistence-capable instance on which the method is called.
If the key is the wrong class for the object id class, null is returned.
<P>For classes that use single field identity, if the parameter is
of one of the following types, the behavior must be as specified:
<ul><li><code>Number</code> or <code>Character</code>: the
parameter must be the single field
type or the wrapper class of the primitive field type; the parameter
is passed to the single field identity constructor
</li><li><code>ObjectIdFieldSupplier</code>: the field value
is fetched from the <code>ObjectIdFieldSupplier</code> and passed to the
single field identity constructor
</li><li><code>String</code>: the String is passed to the
single field identity constructor
</li></ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the <code>Object</code> form of the object id<DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class.
<DT><B>Returns:</B><DD>the new ObjectId instance, or <code>null</code>
if the class is not registered.<DT><B>Since:</B></DT>
<DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="copyKeyFieldsToObjectId(java.lang.Class, javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier, java.lang.Object)"><!-- --></A><H3>
copyKeyFieldsToObjectId</H3>
<PRE>
public void <B>copyKeyFieldsToObjectId</B>(java.lang.Class&nbsp;pcClass,
<A HREF="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldSupplier.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldSupplier</A>&nbsp;fm,
java.lang.Object&nbsp;oid)</PRE>
<DL>
<DD>Copy fields from an outside source to the key fields in the ObjectId.
This method is generated in the <code>PersistenceCapable</code> class to
generate a call to the field manager for each key field in the ObjectId.
<P>For example, an ObjectId class that has three key fields
(<code>int id</code>, <code>String name</code>, and
<code>Float salary</code>) would have the method generated:
<P><code>
void jdoCopyKeyFieldsToObjectId (Object oid, ObjectIdFieldSupplier fm) {
<BR> oid.id = fm.fetchIntField (0);
<BR> oid.name = fm.fetchStringField (1);
<BR> oid.salary = fm.fetchObjectField (2);
<BR>}</code>
<P>The implementation is responsible for implementing the
<code>ObjectIdFieldSupplier</code> to provide the values for the key
fields.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable Class</code>.<DD><CODE>oid</CODE> - the ObjectId target of the copy.<DD><CODE>fm</CODE> - the field manager that supplies the field values.</DL>
</DD>
</DL>
<HR>
<A NAME="copyKeyFieldsFromObjectId(java.lang.Class, javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer, java.lang.Object)"><!-- --></A><H3>
copyKeyFieldsFromObjectId</H3>
<PRE>
public void <B>copyKeyFieldsFromObjectId</B>(java.lang.Class&nbsp;pcClass,
<A HREF="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldConsumer.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldConsumer</A>&nbsp;fm,
java.lang.Object&nbsp;oid)</PRE>
<DL>
<DD>Copy fields to an outside source from the key fields in the ObjectId.
This method is generated in the <code>PersistenceCapable</code> class to
generate a call to the field manager for each key field in the ObjectId.
For example, an ObjectId class that has three key fields
(<code>int id</code>, <code>String name</code>, and
<code>Float salary</code>) would have the method generated:
<P><code>void jdoCopyKeyFieldsFromObjectId
<BR> (PersistenceCapable oid, ObjectIdFieldConsumer fm) {
<BR> fm.storeIntField (0, oid.id);
<BR> fm.storeStringField (1, oid.name);
<BR> fm.storeObjectField (2, oid.salary);
<BR>}</code>
<P>The implementation is responsible for implementing the
<code>ObjectIdFieldConsumer</code> to store the values for the key
fields.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class<DD><CODE>oid</CODE> - the ObjectId source of the copy.<DD><CODE>fm</CODE> - the field manager that receives the field values.</DL>
</DD>
</DL>
<HR>
<A NAME="registerClass(java.lang.Class, java.lang.String[], java.lang.Class[], byte[], java.lang.Class, javax.jdo.spi.PersistenceCapable)"><!-- --></A><H3>
registerClass</H3>
<PRE>
public static void <B>registerClass</B>(java.lang.Class&nbsp;pcClass,
java.lang.String[]&nbsp;fieldNames,
java.lang.Class[]&nbsp;fieldTypes,
byte[]&nbsp;fieldFlags,
java.lang.Class&nbsp;persistenceCapableSuperclass,
<A HREF="../../../javax/jdo/spi/PersistenceCapable.html" title="interface in javax.jdo.spi">PersistenceCapable</A>&nbsp;pc)</PRE>
<DL>
<DD>Register metadata by class. The registration will be done in the
class named <code>JDOImplHelper</code> loaded by the same or an
ancestor class loader as the <code>PersistenceCapable</code> class
performing the registration.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class
used as the key for lookup.<DD><CODE>fieldNames</CODE> - an array of <code>String</code> field names for
persistent and transactional fields<DD><CODE>fieldTypes</CODE> - an array of <code>Class</code> field types<DD><CODE>fieldFlags</CODE> - the Field Flags for persistent and transactional fields<DD><CODE>pc</CODE> - an instance of the <code>PersistenceCapable</code> class<DD><CODE>persistenceCapableSuperclass</CODE> - the most immediate superclass that is
<code>PersistenceCapable</code></DL>
</DD>
</DL>
<HR>
<A NAME="unregisterClasses(java.lang.ClassLoader)"><!-- --></A><H3>
unregisterClasses</H3>
<PRE>
public void <B>unregisterClasses</B>(java.lang.ClassLoader&nbsp;cl)</PRE>
<DL>
<DD>Unregister metadata by class loader. This method unregisters all
registered <code>PersistenceCapable</code> classes loaded by the
specified class loader. Any attempt to get metadata for unregistered
classes will result in a <code>JDOFatalUserException</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cl</CODE> - the class loader.<DT><B>Since:</B></DT>
<DD>1.0.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="unregisterClass(java.lang.Class)"><!-- --></A><H3>
unregisterClass</H3>
<PRE>
public void <B>unregisterClass</B>(java.lang.Class&nbsp;pcClass)</PRE>
<DL>
<DD>Unregister metadata by class. This method unregisters the specified
class. Any further attempt to get metadata for the specified class will
result in a <code>JDOFatalUserException</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pcClass</CODE> - the <code>PersistenceCapable</code> class to be
unregistered.<DT><B>Since:</B></DT>
<DD>1.0.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="addRegisterClassListener(javax.jdo.spi.RegisterClassListener)"><!-- --></A><H3>
addRegisterClassListener</H3>
<PRE>
public void <B>addRegisterClassListener</B>(<A HREF="../../../javax/jdo/spi/RegisterClassListener.html" title="interface in javax.jdo.spi">RegisterClassListener</A>&nbsp;crl)</PRE>
<DL>
<DD>Add the specified <code>RegisterClassListener</code> to the listener
list.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>crl</CODE> - the listener to be added</DL>
</DD>
</DL>
<HR>
<A NAME="removeRegisterClassListener(javax.jdo.spi.RegisterClassListener)"><!-- --></A><H3>
removeRegisterClassListener</H3>
<PRE>
public void <B>removeRegisterClassListener</B>(<A HREF="../../../javax/jdo/spi/RegisterClassListener.html" title="interface in javax.jdo.spi">RegisterClassListener</A>&nbsp;crl)</PRE>
<DL>
<DD>Remove the specified <code>RegisterClassListener</code> from the listener
list.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>crl</CODE> - the listener to be removed</DL>
</DD>
</DL>
<HR>
<A NAME="getRegisteredClasses()"><!-- --></A><H3>
getRegisteredClasses</H3>
<PRE>
public java.util.Collection <B>getRegisteredClasses</B>()</PRE>
<DL>
<DD>Returns a collection of class objects of the registered
persistence-capable classes.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>registered persistence-capable classes</DL>
</DD>
</DL>
<HR>
<A NAME="registerAuthorizedStateManagerClass(java.lang.Class)"><!-- --></A><H3>
registerAuthorizedStateManagerClass</H3>
<PRE>
public static void <B>registerAuthorizedStateManagerClass</B>(java.lang.Class&nbsp;smClass)
throws java.lang.SecurityException</PRE>
<DL>
<DD>Register a class authorized to replaceStateManager. The caller of
this method must be authorized for JDOPermission("setStateManager").
During replaceStateManager, a persistence-capable class will call
the corresponding checkAuthorizedStateManager and the class of the
instance of the parameter must have been registered.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>smClass</CODE> - a Class that is authorized for
JDOPermission("setStateManager").
<DT><B>Throws:</B>
<DD><CODE>java.lang.SecurityException</CODE> - if the caller is not authorized for
JDOPermission("setStateManager").<DT><B>Since:</B></DT>
<DD>1.0.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="registerAuthorizedStateManagerClasses(java.util.Collection)"><!-- --></A><H3>
registerAuthorizedStateManagerClasses</H3>
<PRE>
public static void <B>registerAuthorizedStateManagerClasses</B>(java.util.Collection&nbsp;smClasses)
throws java.lang.SecurityException</PRE>
<DL>
<DD>Register classes authorized to replaceStateManager. The caller of
this method must be authorized for JDOPermission("setStateManager").
During replaceStateManager, a persistence-capable class will call
the corresponding checkAuthorizedStateManager and the class of the
instance of the parameter must have been registered.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>smClasses</CODE> - a Collection of Classes that are authorized for
JDOPermission("setStateManager").
<DT><B>Throws:</B>
<DD><CODE>java.lang.SecurityException</CODE> - if the caller is not authorized for
JDOPermission("setStateManager").<DT><B>Since:</B></DT>
<DD>1.0.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="registerDocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory)"><!-- --></A><H3>
registerDocumentBuilderFactory</H3>
<PRE>
public void <B>registerDocumentBuilderFactory</B>(javax.xml.parsers.DocumentBuilderFactory&nbsp;factory)</PRE>
<DL>
<DD>Register a DocumentBuilderFactory instance for use in parsing the
resource(s) META-INF/jdoconfig.xml. The default is governed by the
semantics of DocumentBuilderFactory.newInstance().
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>factory</CODE> - the DocumentBuilderFactory instance to use<DT><B>Since:</B></DT>
<DD>2.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getRegisteredDocumentBuilderFactory()"><!-- --></A><H3>
getRegisteredDocumentBuilderFactory</H3>
<PRE>
public static javax.xml.parsers.DocumentBuilderFactory <B>getRegisteredDocumentBuilderFactory</B>()</PRE>
<DL>
<DD>Return the registered instance of DocumentBuilderFactory.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the DocumentBuilderFactory if registered; null otherwise<DT><B>Since:</B></DT>
<DD>2.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="registerErrorHandler(org.xml.sax.ErrorHandler)"><!-- --></A><H3>
registerErrorHandler</H3>
<PRE>
public void <B>registerErrorHandler</B>(org.xml.sax.ErrorHandler&nbsp;handler)</PRE>
<DL>
<DD>Register an ErrorHandler instance for use in parsing the
resource(s) META-INF/jdoconfig.xml. The default is an ErrorHandler
that throws on error or fatalError and ignores warnings.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>handler</CODE> - the ErrorHandler instance to use<DT><B>Since:</B></DT>
<DD>2.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getRegisteredErrorHandler()"><!-- --></A><H3>
getRegisteredErrorHandler</H3>
<PRE>
public static org.xml.sax.ErrorHandler <B>getRegisteredErrorHandler</B>()</PRE>
<DL>
<DD>Return the registered instance of ErrorHandler.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the registered ErrorHandler if registered; null otherwise<DT><B>Since:</B></DT>
<DD>2.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="checkAuthorizedStateManager(javax.jdo.spi.StateManager)"><!-- --></A><H3>
checkAuthorizedStateManager</H3>
<PRE>
public static void <B>checkAuthorizedStateManager</B>(<A HREF="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</A>&nbsp;sm)</PRE>
<DL>
<DD>Check that the parameter instance is of a class that is authorized for
JDOPermission("setStateManager"). This method is called by the
replaceStateManager method in persistence-capable classes.
A class that is passed as the parameter to replaceStateManager must be
authorized for JDOPermission("setStateManager"). To improve performance,
first the set of authorized classes is checked, and if not present, a
regular permission check is made. The regular permission check requires
that all callers on the stack, including the persistence-capable class
itself, must be authorized for JDOPermission("setStateManager").
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sm</CODE> - an instance of StateManager whose class is to be checked.<DT><B>Since:</B></DT>
<DD>1.0.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="checkAuthorizedStateManagerClass(java.lang.Class)"><!-- --></A><H3>
checkAuthorizedStateManagerClass</H3>
<PRE>
public static void <B>checkAuthorizedStateManagerClass</B>(java.lang.Class&nbsp;smClass)</PRE>
<DL>
<DD>Check that the parameter instance is a class that is authorized for
JDOPermission("setStateManager"). This method is called by the
constructors of JDO Reference Implementation classes.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>smClass</CODE> - a Class to be checked for JDOPermission("setStateManager")<DT><B>Since:</B></DT>
<DD>1.0.1</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="registerStringConstructor(java.lang.Class, javax.jdo.spi.JDOImplHelper.StringConstructor)"><!-- --></A><H3>
registerStringConstructor</H3>
<PRE>
public java.lang.Object <B>registerStringConstructor</B>(java.lang.Class&nbsp;cls,
<A HREF="../../../javax/jdo/spi/JDOImplHelper.StringConstructor.html" title="interface in javax.jdo.spi">JDOImplHelper.StringConstructor</A>&nbsp;sc)</PRE>
<DL>
<DD>Register special StringConstructor instances. These instances
are for constructing instances from String parameters where there
is no String constructor for them.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cls</CODE> - the class to register a StringConstructor for<DD><CODE>sc</CODE> - the StringConstructor instance
<DT><B>Returns:</B><DD>the previous StringConstructor registered for this class</DL>
</DD>
</DL>
<HR>
<A NAME="construct(java.lang.String, java.lang.String)"><!-- --></A><H3>
construct</H3>
<PRE>
public static java.lang.Object <B>construct</B>(java.lang.String&nbsp;className,
java.lang.String&nbsp;keyString)</PRE>
<DL>
<DD>Construct an instance of the parameter class, using the keyString
as an argument to the constructor. If the class has a StringConstructor
instance registered, use it. If not, try to find a constructor for
the class with a single String argument. Otherwise, throw a
JDOUserException.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>className</CODE> - the name of the class<DD><CODE>keyString</CODE> - the String parameter for the constructor
<DT><B>Returns:</B><DD>the result of construction</DL>
</DD>
</DL>
<HR>
<A NAME="registerDateFormat(java.text.DateFormat)"><!-- --></A><H3>
registerDateFormat</H3>
<PRE>
public void <B>registerDateFormat</B>(java.text.DateFormat&nbsp;df)</PRE>
<DL>
<DD>Register a DateFormat instance for use with constructing Date
instances. The default is the default DateFormat instance.
If the new instance implements SimpleDateFormat, get its pattern
for error messages.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>df</CODE> - the DateFormat instance to use<DT><B>Since:</B></DT>
<DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="addStateInterrogation(javax.jdo.spi.StateInterrogation)"><!-- --></A><H3>
addStateInterrogation</H3>
<PRE>
public void <B>addStateInterrogation</B>(<A HREF="../../../javax/jdo/spi/StateInterrogation.html" title="interface in javax.jdo.spi">StateInterrogation</A>&nbsp;si)</PRE>
<DL>
<DD>Add a StateInterrogation to the list. Create a new list
in case there is an iterator open on the original list.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>si</CODE> - the StateInterrogation to add</DL>
</DD>
</DL>
<HR>
<A NAME="removeStateInterrogation(javax.jdo.spi.StateInterrogation)"><!-- --></A><H3>
removeStateInterrogation</H3>
<PRE>
public void <B>removeStateInterrogation</B>(<A HREF="../../../javax/jdo/spi/StateInterrogation.html" title="interface in javax.jdo.spi">StateInterrogation</A>&nbsp;si)</PRE>
<DL>
<DD>Remove a StateInterrogation from the list. Create a new list
in case there is an iterator open on the original list.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>si</CODE> - the StateInterrogation to remove</DL>
</DD>
</DL>
<HR>
<A NAME="nonBinaryCompatibleMakeDirty(java.lang.Object, java.lang.String)"><!-- --></A><H3>
nonBinaryCompatibleMakeDirty</H3>
<PRE>
public void <B>nonBinaryCompatibleMakeDirty</B>(java.lang.Object&nbsp;pc,
java.lang.String&nbsp;fieldName)</PRE>
<DL>
<DD>Mark a non-binary-compatible instance dirty. Delegate to all
registered StateInterrogation instances until one of them
handles the call.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the instance to mark dirty<DD><CODE>fieldName</CODE> - the field to mark dirty</DL>
</DD>
</DL>
<HR>
<A NAME="nonBinaryCompatibleIs(java.lang.Object, javax.jdo.spi.JDOImplHelper.StateInterrogationBooleanReturn)"><!-- --></A><H3>
nonBinaryCompatibleIs</H3>
<PRE>
public boolean <B>nonBinaryCompatibleIs</B>(java.lang.Object&nbsp;pc,
<A HREF="../../../javax/jdo/spi/JDOImplHelper.StateInterrogationBooleanReturn.html" title="interface in javax.jdo.spi">JDOImplHelper.StateInterrogationBooleanReturn</A>&nbsp;sibr)</PRE>
<DL>
<DD>Determine the state of a non-binary-compatible instance.
Delegate to all registered StateInterrogation instances until
one of them handles the call (returns a non-null Boolean
with the answer).
The caller provides the stateless "method object" that does
the actual call to the StateInterrogation instance.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the instance to be checked<DD><CODE>sibr</CODE> - the method object that delegates to the
non-binary-compatible implementation
<DT><B>Returns:</B><DD>Boolean.TRUE if the instance satisfies the state interrogation;
Boolean.FALSE if the instance does not satisfy the interrogation;
or null if the implementation does not manage the class of the instance</DL>
</DD>
</DL>
<HR>
<A NAME="nonBinaryCompatibleGet(java.lang.Object, javax.jdo.spi.JDOImplHelper.StateInterrogationObjectReturn)"><!-- --></A><H3>
nonBinaryCompatibleGet</H3>
<PRE>
public java.lang.Object <B>nonBinaryCompatibleGet</B>(java.lang.Object&nbsp;pc,
<A HREF="../../../javax/jdo/spi/JDOImplHelper.StateInterrogationObjectReturn.html" title="interface in javax.jdo.spi">JDOImplHelper.StateInterrogationObjectReturn</A>&nbsp;sibr)</PRE>
<DL>
<DD>Return an object associated with a non-binary-compatible instance.
Delegate to all registered StateInterrogation instances until
one of them handles the call (returns a non-null answer).
The caller provides the stateless "method object" that does
the actual call to the StateInterrogation instance.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the instance whose associated object is needed<DD><CODE>sibr</CODE> - the method object that delegates to the
non-binary-compatible implementation
<DT><B>Returns:</B><DD>the associated object or null if the implementation does not
manage the class of the instance</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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JDOImplHelper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/jdo/spi/I18NHelper.html" title="class in javax.jdo.spi"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/jdo/spi/JDOImplHelper.StateInterrogationBooleanReturn.html" title="interface in javax.jdo.spi"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?javax/jdo/spi/JDOImplHelper.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JDOImplHelper.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &copy; 2005-2008 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>