blob: 74f309c6a3bb0f4de8ab12140c68ca4496272493 [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.4.2_09) on Thu Oct 13 20:55:51 PDT 2005 -->
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
JDOHelper (JDO1 API 1.1)
</TITLE>
<META NAME="keywords" CONTENT="javax.jdo.JDOHelper class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="JDOHelper (JDO1 API 1.1)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= 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=3 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/JDOHelper.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;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JDOHelper.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;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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</FONT>
<BR>
Class JDOHelper</H2>
<PRE>
java.lang.Object
<IMG SRC="../../resources/inherit.gif" ALT="extended by"><B>javax.jdo.JDOHelper</B>
</PRE>
<HR>
<DL>
<DT>public class <B>JDOHelper</B><DT>extends java.lang.Object</DL>
<P>
This class can be used by a JDO-aware application to call the JDO behavior
of <code>PersistenceCapable</code> instances without declaring them to be
<code>PersistenceCapable</code>.
It is also used to acquire a <code>PersistenceManagerFactory</code> via a standard
<code>Properties</code> construction.
<P>Every class whose instances can be managed by a JDO <code>PersistenceManager</code> must
implement the <code>PersistenceCapable</code> interface.
<P>This helper class defines static methods that allow a JDO-aware
application to examine the runtime state of instances. For example,
an application can discover whether the instance is persistent, transactional,
dirty, new, or deleted; and to get its associated
<code>PersistenceManager</code> if it has one.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>1.0.2</DD>
<DT><B>Author:</B></DT>
<DD>Craig Russell</DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../javax/jdo/JDOHelper.html#JDOHelper()">JDOHelper</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></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/JDOHelper.html#getObjectId(java.lang.Object)">getObjectId</A></B>(java.lang.Object&nbsp;pc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a copy of the JDO identity associated with the parameter instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../javax/jdo/PersistenceManager.html" title="interface in javax.jdo">PersistenceManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/JDOHelper.html#getPersistenceManager(java.lang.Object)">getPersistenceManager</A></B>(java.lang.Object&nbsp;pc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the associated <code>PersistenceManager</code> if there is one.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../javax/jdo/PersistenceManagerFactory.html" title="interface in javax.jdo">PersistenceManagerFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/JDOHelper.html#getPersistenceManagerFactory(java.util.Properties)">getPersistenceManagerFactory</A></B>(java.util.Properties&nbsp;props)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a <code>PersistenceManagerFactory</code> based on a <code>Properties</code> instance, using
the current thread's context class loader to locate the
<code>PersistenceManagerFactory</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/PersistenceManagerFactory.html" title="interface in javax.jdo">PersistenceManagerFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/JDOHelper.html#getPersistenceManagerFactory(java.util.Properties, java.lang.ClassLoader)">getPersistenceManagerFactory</A></B>(java.util.Properties&nbsp;props,
java.lang.ClassLoader&nbsp;cl)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a <code>PersistenceManagerFactory</code> based on a <code>Properties</code>
instance and a class loader.</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/JDOHelper.html#getTransactionalObjectId(java.lang.Object)">getTransactionalObjectId</A></B>(java.lang.Object&nbsp;pc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a copy of the JDO identity associated with the parameter instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/JDOHelper.html#isDeleted(java.lang.Object)">isDeleted</A></B>(java.lang.Object&nbsp;pc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether the parameter instance has been deleted.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/JDOHelper.html#isDirty(java.lang.Object)">isDirty</A></B>(java.lang.Object&nbsp;pc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether the parameter instance is dirty.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/JDOHelper.html#isNew(java.lang.Object)">isNew</A></B>(java.lang.Object&nbsp;pc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether the parameter instance has been newly made persistent.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/JDOHelper.html#isPersistent(java.lang.Object)">isPersistent</A></B>(java.lang.Object&nbsp;pc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether the parameter instance is persistent.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/JDOHelper.html#isTransactional(java.lang.Object)">isTransactional</A></B>(java.lang.Object&nbsp;pc)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether the parameter instance is transactional.</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/JDOHelper.html#makeDirty(java.lang.Object, java.lang.String)">makeDirty</A></B>(java.lang.Object&nbsp;pc,
java.lang.String&nbsp;fieldName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Explicitly mark the parameter instance and field dirty.</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">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</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>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="JDOHelper()"><!-- --></A><H3>
JDOHelper</H3>
<PRE>
public <B>JDOHelper</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getPersistenceManager(java.lang.Object)"><!-- --></A><H3>
getPersistenceManager</H3>
<PRE>
public static <A HREF="../../javax/jdo/PersistenceManager.html" title="interface in javax.jdo">PersistenceManager</A> <B>getPersistenceManager</B>(java.lang.Object&nbsp;pc)</PRE>
<DL>
<DD>Return the associated <code>PersistenceManager</code> if there is one.
Transactional and persistent instances return the associated
<code>PersistenceManager</code>.
<P>Transient non-transactional instances and instances of classes
that do not implement <code>PersistenceCapable</code> return <code>null</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the <code>PersistenceCapable</code> instance.
<DT><B>Returns:</B><DD>the <code>PersistenceManager</code> associated with the parameter instance.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/spi/PersistenceCapable.html#jdoGetPersistenceManager()"><CODE>PersistenceCapable.jdoGetPersistenceManager()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="makeDirty(java.lang.Object, java.lang.String)"><!-- --></A><H3>
makeDirty</H3>
<PRE>
public static void <B>makeDirty</B>(java.lang.Object&nbsp;pc,
java.lang.String&nbsp;fieldName)</PRE>
<DL>
<DD>Explicitly mark the parameter instance and field dirty.
Normally, <code>PersistenceCapable</code> classes are able to detect changes made
to their fields. However, if a reference to an array is given to a
method outside the class, and the array is modified, then the
persistent instance is not aware of the change. This API allows the
application to notify the instance that a change was made to a field.
<P>Transient instances and instances of classes
that do not implement <code>PersistenceCapable</code> ignore this method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the <code>PersistenceCapable</code> instance.<DD><CODE>fieldName</CODE> - the name of the field to be marked dirty.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/spi/PersistenceCapable.html#jdoMakeDirty(java.lang.String)"><CODE>PersistenceCapable.jdoMakeDirty(String fieldName)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getObjectId(java.lang.Object)"><!-- --></A><H3>
getObjectId</H3>
<PRE>
public static java.lang.Object <B>getObjectId</B>(java.lang.Object&nbsp;pc)</PRE>
<DL>
<DD>Return a copy of the JDO identity associated with the parameter instance.
<P>Persistent instances of <code>PersistenceCapable</code> classes have a JDO identity
managed by the <code>PersistenceManager</code>. This method returns a copy of the
ObjectId that represents the JDO identity.
<P>Transient instances and instances of classes
that do not implement <code>PersistenceCapable</code> return <code>null</code>.
<P>The ObjectId may be serialized
and later restored, and used with a <code>PersistenceManager</code> from the same JDO
implementation to locate a persistent instance with the same data store
identity.
<P>If the JDO identity is managed by the application, then the ObjectId may
be used with a <code>PersistenceManager</code> from any JDO implementation that supports
the <code>PersistenceCapable</code> class.
<P>If the JDO identity is not managed by the application or the data store,
then the ObjectId returned is only valid within the current transaction.
<P>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the PersistenceCapable instance.
<DT><B>Returns:</B><DD>a copy of the ObjectId of the parameter instance as of the beginning of the transaction.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/PersistenceManager.html#getObjectId(java.lang.Object)"><CODE>PersistenceManager.getObjectId(Object pc)</CODE></A>,
<A HREF="../../javax/jdo/spi/PersistenceCapable.html#jdoGetObjectId()"><CODE>PersistenceCapable.jdoGetObjectId()</CODE></A>,
<A HREF="../../javax/jdo/PersistenceManager.html#getObjectById(java.lang.Object, boolean)"><CODE>PersistenceManager.getObjectById(Object oid, boolean validate)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getTransactionalObjectId(java.lang.Object)"><!-- --></A><H3>
getTransactionalObjectId</H3>
<PRE>
public static java.lang.Object <B>getTransactionalObjectId</B>(java.lang.Object&nbsp;pc)</PRE>
<DL>
<DD>Return a copy of the JDO identity associated with the parameter instance.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the <code>PersistenceCapable</code> instance.
<DT><B>Returns:</B><DD>a copy of the ObjectId of the parameter instance as modified in this transaction.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/spi/PersistenceCapable.html#jdoGetTransactionalObjectId()"><CODE>PersistenceCapable.jdoGetTransactionalObjectId()</CODE></A>,
<A HREF="../../javax/jdo/PersistenceManager.html#getObjectById(java.lang.Object, boolean)"><CODE>PersistenceManager.getObjectById(Object oid, boolean validate)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isDirty(java.lang.Object)"><!-- --></A><H3>
isDirty</H3>
<PRE>
public static boolean <B>isDirty</B>(java.lang.Object&nbsp;pc)</PRE>
<DL>
<DD>Tests whether the parameter instance is dirty.
Instances that have been modified, deleted, or newly
made persistent in the current transaction return <code>true</code>.
<P>Transient instances and instances of classes
that do not implement <code>PersistenceCapable</code> return <code>false</code>.
<P>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the <code>PersistenceCapable</code> instance.
<DT><B>Returns:</B><DD><code>true</code> if the parameter instance has been modified in the current transaction.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/spi/StateManager.html#makeDirty(javax.jdo.spi.PersistenceCapable, java.lang.String)"><CODE>StateManager.makeDirty(PersistenceCapable pc, String fieldName)</CODE></A>,
<A HREF="../../javax/jdo/spi/PersistenceCapable.html#jdoIsDirty()"><CODE>PersistenceCapable.jdoIsDirty()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isTransactional(java.lang.Object)"><!-- --></A><H3>
isTransactional</H3>
<PRE>
public static boolean <B>isTransactional</B>(java.lang.Object&nbsp;pc)</PRE>
<DL>
<DD>Tests whether the parameter instance is transactional.
Instances whose state is associated with the current transaction
return true.
<P>Transient instances and instances of classes
that do not implement <code>PersistenceCapable</code> return <code>false</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the <code>PersistenceCapable</code> instance.
<DT><B>Returns:</B><DD><code>true</code> if the parameter instance is transactional.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/spi/PersistenceCapable.html#jdoIsTransactional()"><CODE>PersistenceCapable.jdoIsTransactional()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isPersistent(java.lang.Object)"><!-- --></A><H3>
isPersistent</H3>
<PRE>
public static boolean <B>isPersistent</B>(java.lang.Object&nbsp;pc)</PRE>
<DL>
<DD>Tests whether the parameter instance is persistent.
Instances that represent persistent objects in the data store
return <code>true</code>.
<P>Transient instances and instances of classes
that do not implement <code>PersistenceCapable</code> return <code>false</code>.
<P>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the <code>PersistenceCapable</code> instance.
<DT><B>Returns:</B><DD><code>true</code> if the parameter instance is persistent.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/PersistenceManager.html#makePersistent(java.lang.Object)"><CODE>PersistenceManager.makePersistent(Object pc)</CODE></A>,
<A HREF="../../javax/jdo/spi/PersistenceCapable.html#jdoIsPersistent()"><CODE>PersistenceCapable.jdoIsPersistent()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isNew(java.lang.Object)"><!-- --></A><H3>
isNew</H3>
<PRE>
public static boolean <B>isNew</B>(java.lang.Object&nbsp;pc)</PRE>
<DL>
<DD>Tests whether the parameter instance has been newly made persistent.
Instances that have been made persistent in the current transaction
return <code>true</code>.
<P>Transient instances and instances of classes
that do not implement <code>PersistenceCapable</code> return <code>false</code>.
<P>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the <code>PersistenceCapable</code> instance.
<DT><B>Returns:</B><DD><code>true</code> if the parameter instance was made persistent
in the current transaction.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/PersistenceManager.html#makePersistent(java.lang.Object)"><CODE>PersistenceManager.makePersistent(Object pc)</CODE></A>,
<A HREF="../../javax/jdo/spi/PersistenceCapable.html#jdoIsNew()"><CODE>PersistenceCapable.jdoIsNew()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isDeleted(java.lang.Object)"><!-- --></A><H3>
isDeleted</H3>
<PRE>
public static boolean <B>isDeleted</B>(java.lang.Object&nbsp;pc)</PRE>
<DL>
<DD>Tests whether the parameter instance has been deleted.
Instances that have been deleted in the current transaction return <code>true</code>.
<P>Transient instances and instances of classes
that do not implement <code>PersistenceCapable</code> return <code>false</code>.
<P>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pc</CODE> - the <code>PersistenceCapable</code> instance.
<DT><B>Returns:</B><DD><code>true</code> if the parameter instance was deleted
in the current transaction.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/PersistenceManager.html#deletePersistent(java.lang.Object)"><CODE>PersistenceManager.deletePersistent(Object pc)</CODE></A>,
<A HREF="../../javax/jdo/spi/PersistenceCapable.html#jdoIsDeleted()"><CODE>PersistenceCapable.jdoIsDeleted()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getPersistenceManagerFactory(java.util.Properties)"><!-- --></A><H3>
getPersistenceManagerFactory</H3>
<PRE>
public static <A HREF="../../javax/jdo/PersistenceManagerFactory.html" title="interface in javax.jdo">PersistenceManagerFactory</A> <B>getPersistenceManagerFactory</B>(java.util.Properties&nbsp;props)</PRE>
<DL>
<DD>Get a <code>PersistenceManagerFactory</code> based on a <code>Properties</code> instance, using
the current thread's context class loader to locate the
<code>PersistenceManagerFactory</code> class.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>props</CODE> - a <code>Properties</code> instance with properties of the <code>PersistenceManagerFactory</code>.
<DT><B>Returns:</B><DD>the <code>PersistenceManagerFactory</code>.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/JDOHelper.html#getPersistenceManagerFactory(java.util.Properties, java.lang.ClassLoader)"><CODE>getPersistenceManagerFactory(Properties,ClassLoader)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getPersistenceManagerFactory(java.util.Properties, java.lang.ClassLoader)"><!-- --></A><H3>
getPersistenceManagerFactory</H3>
<PRE>
public static <A HREF="../../javax/jdo/PersistenceManagerFactory.html" title="interface in javax.jdo">PersistenceManagerFactory</A> <B>getPersistenceManagerFactory</B>(java.util.Properties&nbsp;props,
java.lang.ClassLoader&nbsp;cl)</PRE>
<DL>
<DD>Get a <code>PersistenceManagerFactory</code> based on a <code>Properties</code>
instance and a class loader.
The following are standard key values:
<BR><code>"javax.jdo.PersistenceManagerFactoryClass"
<BR>"javax.jdo.option.Optimistic",
<BR>"javax.jdo.option.RetainValues",
<BR>"javax.jdo.option.RestoreValues",
<BR>"javax.jdo.option.IgnoreCache",
<BR>"javax.jdo.option.NontransactionalRead",
<BR>"javax.jdo.option.NontransactionalWrite",
<BR>"javax.jdo.option.Multithreaded",
<BR>"javax.jdo.option.ConnectionUserName",
<BR>"javax.jdo.option.ConnectionPassword",
<BR>"javax.jdo.option.ConnectionURL",
<BR>"javax.jdo.option.ConnectionFactoryName",
<BR>"javax.jdo.option.ConnectionFactory2Name".
</code><P>JDO implementations
are permitted to define key values of their own. Any key values not
recognized by the implementation must be ignored. Key values that are
recognized but not supported by an implementation must result in a
<code>JDOFatalUserException</code> thrown by the method.
<P>The returned <code>PersistenceManagerFactory</code> is not configurable (the
<code>set<I>XXX</I></code> methods will throw an exception).
<P>JDO implementations might manage a map of instantiated
<code>PersistenceManagerFactory</code> instances based on specified property key
values, and return a previously instantiated <code>PersistenceManagerFactory</code>
instance. In this case, the properties of the returned
instance must exactly match the requested properties.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>props</CODE> - a <code>Properties</code> instance with properties of the <code>PersistenceManagerFactory</code>.<DD><CODE>cl</CODE> - a class loader to use to load the <code>PersistenceManagerFactory</code> class.
<DT><B>Returns:</B><DD>the <code>PersistenceManagerFactory</code>.</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=3 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/JDOHelper.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;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JDOHelper.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;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>