blob: 7b3b45ab1bcf3ff18ed21bbee8466109f8bcc7ef [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>
Transaction (JDO1 API 1.1)
</TITLE>
<META NAME="keywords" CONTENT="javax.jdo.Transaction interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Transaction (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/Transaction.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/Query.html" title="interface in javax.jdo"><B>PREV CLASS</B></A>&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="Transaction.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;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</FONT>
<BR>
Interface Transaction</H2>
<HR>
<DL>
<DT>public interface <B>Transaction</B></DL>
<P>
The JDO <code>Transaction</code> interface provides for initiation and completion
of transactions under user control.
It is a sub-interface of the <A HREF="../../javax/jdo/PersistenceManager.html" title="interface in javax.jdo"><CODE>PersistenceManager</CODE></A>
that deals with options and transaction demarcation.
<P>Transaction options include whether optimistic concurrency
control should be used for the current transaction, whether instances
may hold values in the cache outside transactions, and whether
values should be retained in the cache after transaction completion. These
options are valid for both managed and non-managed transactions.
<P>Transaction completion methods have the same semantics as
<code>javax.transaction.UserTransaction</code>, and are valid only in the
non-managed, non-distributed transaction environment.
<P>For operation in the distributed environment, <code>Transaction</code> is declared
to implement <code>javax.transaction.Synchronization</code>. This allows for
flushing the cache to the data store during externally managed
transaction completion.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>1.0</DD>
<DT><B>Author:</B></DT>
<DD>Craig Russell</DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== 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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/Transaction.html#begin()">begin</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Begin a transaction.</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/Transaction.html#commit()">commit</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Commit the current transaction.</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/Transaction.html#getNontransactionalRead()">getNontransactionalRead</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <code>true</code>, allows persistent instances to be read without
a transaction active.</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/Transaction.html#getNontransactionalWrite()">getNontransactionalWrite</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <code>true</code>, allows persistent instances to be written without
a transaction active.</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/Transaction.html#getOptimistic()">getOptimistic</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Optimistic transactions do not hold data store locks until commit time.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../javax/jdo/PersistenceManager.html" title="interface in javax.jdo">PersistenceManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/Transaction.html#getPersistenceManager()">getPersistenceManager</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The <code>Transaction</code> instance is always associated with exactly one
<code>PersistenceManager</code>.</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/Transaction.html#getRestoreValues()">getRestoreValues</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the current value of the restoreValues property.</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/Transaction.html#getRetainValues()">getRetainValues</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <code>true</code>, at commit time instances retain their field values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;javax.transaction.Synchronization</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/jdo/Transaction.html#getSynchronization()">getSynchronization</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The user-specified <code>Synchronization</code> instance for this <code>Transaction</code> 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/Transaction.html#isActive()">isActive</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether there is a transaction currently active.</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/Transaction.html#rollback()">rollback</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Roll back the current transaction.</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/Transaction.html#setNontransactionalRead(boolean)">setNontransactionalRead</A></B>(boolean&nbsp;nontransactionalRead)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <code>true</code>, allow persistent instances to be read without
a transaction active.</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/Transaction.html#setNontransactionalWrite(boolean)">setNontransactionalWrite</A></B>(boolean&nbsp;nontransactionalWrite)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <code>true</code>, allow persistent instances to be written without
a transaction active.</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/Transaction.html#setOptimistic(boolean)">setOptimistic</A></B>(boolean&nbsp;optimistic)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Optimistic transactions do not hold data store locks until commit time.</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/Transaction.html#setRestoreValues(boolean)">setRestoreValues</A></B>(boolean&nbsp;restoreValues)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <code>true</code>, at rollback, fields of newly persistent instances
are restored to
their values as of the beginning of the transaction, and the instances
revert to transient.</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/Transaction.html#setRetainValues(boolean)">setRetainValues</A></B>(boolean&nbsp;retainValues)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <code>true</code>, at commit instances retain their values and the instances
transition to persistent-nontransactional.</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/Transaction.html#setSynchronization(javax.transaction.Synchronization)">setSynchronization</A></B>(javax.transaction.Synchronization&nbsp;sync)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The user can specify a <code>Synchronization</code> instance to be notified on
transaction completions.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ 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="begin()"><!-- --></A><H3>
begin</H3>
<PRE>
public void <B>begin</B>()</PRE>
<DL>
<DD>Begin a transaction. The type of transaction is determined by the
setting of the Optimistic flag.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../javax/jdo/JDOUserException.html" title="class in javax.jdo">JDOUserException</A></CODE> - if transactions are managed by a container
in the managed environment, or if the transaction is already active.<DT><B>See Also:</B><DD><A HREF="../../javax/jdo/Transaction.html#setOptimistic(boolean)"><CODE>setOptimistic(boolean)</CODE></A>,
<A HREF="../../javax/jdo/Transaction.html#getOptimistic()"><CODE>getOptimistic()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="commit()"><!-- --></A><H3>
commit</H3>
<PRE>
public void <B>commit</B>()</PRE>
<DL>
<DD>Commit the current transaction.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../javax/jdo/JDOUserException.html" title="class in javax.jdo">JDOUserException</A></CODE> - if transactions are managed by a container
in the managed environment, or if the transaction is not active.</DL>
</DD>
</DL>
<HR>
<A NAME="rollback()"><!-- --></A><H3>
rollback</H3>
<PRE>
public void <B>rollback</B>()</PRE>
<DL>
<DD>Roll back the current transaction.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../javax/jdo/JDOUserException.html" title="class in javax.jdo">JDOUserException</A></CODE> - if transactions are managed by a container
in the managed environment, or if the transaction is not active.</DL>
</DD>
</DL>
<HR>
<A NAME="isActive()"><!-- --></A><H3>
isActive</H3>
<PRE>
public boolean <B>isActive</B>()</PRE>
<DL>
<DD>Returns whether there is a transaction currently active.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if the transaction is active.</DL>
</DD>
</DL>
<HR>
<A NAME="setNontransactionalRead(boolean)"><!-- --></A><H3>
setNontransactionalRead</H3>
<PRE>
public void <B>setNontransactionalRead</B>(boolean&nbsp;nontransactionalRead)</PRE>
<DL>
<DD>If <code>true</code>, allow persistent instances to be read without
a transaction active.
If an implementation does not support this option, a
<code>JDOUnsupportedOptionException</code> is thrown.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nontransactionalRead</CODE> - the value of the nontransactionalRead property</DL>
</DD>
</DL>
<HR>
<A NAME="getNontransactionalRead()"><!-- --></A><H3>
getNontransactionalRead</H3>
<PRE>
public boolean <B>getNontransactionalRead</B>()</PRE>
<DL>
<DD>If <code>true</code>, allows persistent instances to be read without
a transaction active.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the value of the nontransactionalRead property</DL>
</DD>
</DL>
<HR>
<A NAME="setNontransactionalWrite(boolean)"><!-- --></A><H3>
setNontransactionalWrite</H3>
<PRE>
public void <B>setNontransactionalWrite</B>(boolean&nbsp;nontransactionalWrite)</PRE>
<DL>
<DD>If <code>true</code>, allow persistent instances to be written without
a transaction active.
If an implementation does not support this option, a
<code>JDOUnsupportedOptionException</code> is thrown.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nontransactionalWrite</CODE> - the value of the nontransactionalRead property</DL>
</DD>
</DL>
<HR>
<A NAME="getNontransactionalWrite()"><!-- --></A><H3>
getNontransactionalWrite</H3>
<PRE>
public boolean <B>getNontransactionalWrite</B>()</PRE>
<DL>
<DD>If <code>true</code>, allows persistent instances to be written without
a transaction active.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the value of the nontransactionalWrite property</DL>
</DD>
</DL>
<HR>
<A NAME="setRetainValues(boolean)"><!-- --></A><H3>
setRetainValues</H3>
<PRE>
public void <B>setRetainValues</B>(boolean&nbsp;retainValues)</PRE>
<DL>
<DD>If <code>true</code>, at commit instances retain their values and the instances
transition to persistent-nontransactional.
If an implementation does not support this option, a
<code>JDOUnsupportedOptionException</code> is thrown.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>retainValues</CODE> - the value of the retainValues property</DL>
</DD>
</DL>
<HR>
<A NAME="getRetainValues()"><!-- --></A><H3>
getRetainValues</H3>
<PRE>
public boolean <B>getRetainValues</B>()</PRE>
<DL>
<DD>If <code>true</code>, at commit time instances retain their field values.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the value of the retainValues property</DL>
</DD>
</DL>
<HR>
<A NAME="setRestoreValues(boolean)"><!-- --></A><H3>
setRestoreValues</H3>
<PRE>
public void <B>setRestoreValues</B>(boolean&nbsp;restoreValues)</PRE>
<DL>
<DD>If <code>true</code>, at rollback, fields of newly persistent instances
are restored to
their values as of the beginning of the transaction, and the instances
revert to transient. Additionally, fields of modified
instances of primitive types and immutable reference types
are restored to their values as of the beginning of the
transaction.
<P>If <code>false</code>, at rollback, the values of fields of
newly persistent instances are unchanged and the instances revert to
transient. Additionally, dirty instances transition to hollow.
If an implementation does not support this option, a
<code>JDOUnsupportedOptionException</code> is thrown.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>restoreValues</CODE> - the value of the restoreValues property</DL>
</DD>
</DL>
<HR>
<A NAME="getRestoreValues()"><!-- --></A><H3>
getRestoreValues</H3>
<PRE>
public boolean <B>getRestoreValues</B>()</PRE>
<DL>
<DD>Return the current value of the restoreValues property.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the value of the restoreValues property</DL>
</DD>
</DL>
<HR>
<A NAME="setOptimistic(boolean)"><!-- --></A><H3>
setOptimistic</H3>
<PRE>
public void <B>setOptimistic</B>(boolean&nbsp;optimistic)</PRE>
<DL>
<DD>Optimistic transactions do not hold data store locks until commit time.
If an implementation does not support this option, a
<code>JDOUnsupportedOptionException</code> is thrown.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>optimistic</CODE> - the value of the Optimistic flag.</DL>
</DD>
</DL>
<HR>
<A NAME="getOptimistic()"><!-- --></A><H3>
getOptimistic</H3>
<PRE>
public boolean <B>getOptimistic</B>()</PRE>
<DL>
<DD>Optimistic transactions do not hold data store locks until commit time.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the value of the Optimistic property.</DL>
</DD>
</DL>
<HR>
<A NAME="setSynchronization(javax.transaction.Synchronization)"><!-- --></A><H3>
setSynchronization</H3>
<PRE>
public void <B>setSynchronization</B>(javax.transaction.Synchronization&nbsp;sync)</PRE>
<DL>
<DD>The user can specify a <code>Synchronization</code> instance to be notified on
transaction completions. The <code>beforeCompletion</code> method is called prior
to flushing instances to the data store.
<P>The <code>afterCompletion</code> method is called after performing state
transitions of persistent and transactional instances, following
the data store commit or rollback operation.
<P>Only one <code>Synchronization</code> instance can be registered with the
<code>Transaction</code>. If the application requires more than one instance to
receive synchronization callbacks, then the single application instance
is responsible for managing them, and forwarding callbacks to them.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sync</CODE> - the <code>Synchronization</code> instance to be notified; <code>null</code> for none</DL>
</DD>
</DL>
<HR>
<A NAME="getSynchronization()"><!-- --></A><H3>
getSynchronization</H3>
<PRE>
public javax.transaction.Synchronization <B>getSynchronization</B>()</PRE>
<DL>
<DD>The user-specified <code>Synchronization</code> instance for this <code>Transaction</code> instance.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the user-specified <code>Synchronization</code> instance.</DL>
</DD>
</DL>
<HR>
<A NAME="getPersistenceManager()"><!-- --></A><H3>
getPersistenceManager</H3>
<PRE>
public <A HREF="../../javax/jdo/PersistenceManager.html" title="interface in javax.jdo">PersistenceManager</A> <B>getPersistenceManager</B>()</PRE>
<DL>
<DD>The <code>Transaction</code> instance is always associated with exactly one
<code>PersistenceManager</code>.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the <code>PersistenceManager</code> for this <code>Transaction</code> 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=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/Transaction.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/Query.html" title="interface in javax.jdo"><B>PREV CLASS</B></A>&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="Transaction.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;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 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>