| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Transaction (JDO API 3.2.1)</title> |
| <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Transaction (JDO API 3.2.1)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Transaction.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../index-all.html">Index</a></li> |
| <li><a href="../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../javax/jdo/Query.html" title="interface in javax.jdo"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/jdo/Transaction.html" target="_top">Frames</a></li> |
| <li><a href="Transaction.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">javax.jdo</div> |
| <h2 title="Interface Transaction" class="title">Interface Transaction</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">Transaction</span></pre> |
| <div class="block">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 initiation and completion methods have similar semantics to |
| <code>javax.transaction.UserTransaction</code> when used outside a managed |
| environment. When used in a managed environment, transaction initiation |
| and completion methods may only be used with bean-managed transaction |
| semantics.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Version:</span></dt> |
| <dd>3.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#begin--">begin</a></span>()</code> |
| <div class="block">Begin a transaction.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#commit--">commit</a></span>()</code> |
| <div class="block">Commit the current transaction.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#getIsolationLevel--">getIsolationLevel</a></span>()</code> |
| <div class="block">Get the value for transaction isolation level for this transaction.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#getNontransactionalRead--">getNontransactionalRead</a></span>()</code> |
| <div class="block">If <code>true</code>, allows persistent instances to be read without |
| a transaction active.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#getNontransactionalWrite--">getNontransactionalWrite</a></span>()</code> |
| <div class="block">If <code>true</code>, allows persistent instances to be written without |
| a transaction active.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#getOptimistic--">getOptimistic</a></span>()</code> |
| <div class="block">Optimistic transactions do not hold data store locks until commit time.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="../../javax/jdo/PersistenceManager.html" title="interface in javax.jdo">PersistenceManager</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#getPersistenceManager--">getPersistenceManager</a></span>()</code> |
| <div class="block">The <code>Transaction</code> instance is always associated with exactly |
| one <code>PersistenceManager</code>.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#getRestoreValues--">getRestoreValues</a></span>()</code> |
| <div class="block">Return the current value of the restoreValues property.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#getRetainValues--">getRetainValues</a></span>()</code> |
| <div class="block">If <code>true</code>, at commit time instances retain their field |
| values.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#getRollbackOnly--">getRollbackOnly</a></span>()</code> |
| <div class="block">Returns the rollback-only status of the transaction.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#getSerializeRead--">getSerializeRead</a></span>()</code> |
| <div class="block">Return the current value of the serializeRead property.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/javax/transaction/Synchronization.html?is-external=true" title="class or interface in javax.transaction">Synchronization</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#getSynchronization--">getSynchronization</a></span>()</code> |
| <div class="block">The user-specified <code>Synchronization</code> instance for this |
| <code>Transaction</code> instance.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#isActive--">isActive</a></span>()</code> |
| <div class="block">Returns whether there is a transaction currently active.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#rollback--">rollback</a></span>()</code> |
| <div class="block">Roll back the current transaction.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#setIsolationLevel-java.lang.String-">setIsolationLevel</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> level)</code> |
| <div class="block">Set the value for transaction isolation level for this transaction.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#setNontransactionalRead-boolean-">setNontransactionalRead</a></span>(boolean nontransactionalRead)</code> |
| <div class="block">If <code>true</code>, allow persistent instances to be read without |
| a transaction active.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#setNontransactionalWrite-boolean-">setNontransactionalWrite</a></span>(boolean nontransactionalWrite)</code> |
| <div class="block">If <code>true</code>, allow persistent instances to be written without |
| a transaction active.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#setOptimistic-boolean-">setOptimistic</a></span>(boolean optimistic)</code> |
| <div class="block">Optimistic transactions do not hold data store locks until commit time.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#setRestoreValues-boolean-">setRestoreValues</a></span>(boolean restoreValues)</code> |
| <div class="block">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.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#setRetainValues-boolean-">setRetainValues</a></span>(boolean retainValues)</code> |
| <div class="block">If <code>true</code>, at commit instances retain their values and the |
| instances transition to persistent-nontransactional.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#setRollbackOnly--">setRollbackOnly</a></span>()</code> |
| <div class="block">Sets the rollback-only status of the transaction to <code>true</code>.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#setSerializeRead-java.lang.Boolean-">setSerializeRead</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> serialize)</code> |
| <div class="block">If <code>true</code>, a lock will be applied to all objects read in this |
| transaction.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../javax/jdo/Transaction.html#setSynchronization-javax.transaction.Synchronization-">setSynchronization</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/javax/transaction/Synchronization.html?is-external=true" title="class or interface in javax.transaction">Synchronization</a> sync)</code> |
| <div class="block">The user can specify a <code>Synchronization</code> instance to be |
| notified on transaction completions.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="begin--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>begin</h4> |
| <pre>void begin()</pre> |
| <div class="block">Begin a transaction. The type of transaction is determined by the |
| setting of the Optimistic flag.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <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.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <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></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="commit--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>commit</h4> |
| <pre>void commit()</pre> |
| <div class="block">Commit the current transaction.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <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.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="rollback--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rollback</h4> |
| <pre>void rollback()</pre> |
| <div class="block">Roll back the current transaction.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <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.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isActive--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isActive</h4> |
| <pre>boolean isActive()</pre> |
| <div class="block">Returns whether there is a transaction currently active.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the transaction is active.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getRollbackOnly--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRollbackOnly</h4> |
| <pre>boolean getRollbackOnly()</pre> |
| <div class="block">Returns the rollback-only status of the transaction. When |
| begun, the rollback-only status is false. Either the |
| application or the JDO implementation may set this flag |
| using setRollbackOnly.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the transaction has been |
| marked for rollback.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setRollbackOnly--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setRollbackOnly</h4> |
| <pre>void setRollbackOnly()</pre> |
| <div class="block">Sets the rollback-only status of the transaction to <code>true</code>. |
| After this flag is set to <code>true</code>, the transaction |
| can no longer be committed, and any attempt to commit the |
| transaction will throw <code>JDOFatalDataStoreException</code>.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setNontransactionalRead-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setNontransactionalRead</h4> |
| <pre>void setNontransactionalRead(boolean nontransactionalRead)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>nontransactionalRead</code> - the value of the nontransactionalRead |
| property</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNontransactionalRead--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNontransactionalRead</h4> |
| <pre>boolean getNontransactionalRead()</pre> |
| <div class="block">If <code>true</code>, allows persistent instances to be read without |
| a transaction active.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the value of the nontransactionalRead property</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setNontransactionalWrite-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setNontransactionalWrite</h4> |
| <pre>void setNontransactionalWrite(boolean nontransactionalWrite)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>nontransactionalWrite</code> - the value of the nontransactionalRead |
| property</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNontransactionalWrite--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNontransactionalWrite</h4> |
| <pre>boolean getNontransactionalWrite()</pre> |
| <div class="block">If <code>true</code>, allows persistent instances to be written without |
| a transaction active.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the value of the nontransactionalWrite property</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setRetainValues-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setRetainValues</h4> |
| <pre>void setRetainValues(boolean retainValues)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>retainValues</code> - the value of the retainValues property</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getRetainValues--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRetainValues</h4> |
| <pre>boolean getRetainValues()</pre> |
| <div class="block">If <code>true</code>, at commit time instances retain their field |
| values.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the value of the retainValues property</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setRestoreValues-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setRestoreValues</h4> |
| <pre>void setRestoreValues(boolean restoreValues)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>restoreValues</code> - the value of the restoreValues property</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getRestoreValues--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRestoreValues</h4> |
| <pre>boolean getRestoreValues()</pre> |
| <div class="block">Return the current value of the restoreValues property.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the value of the restoreValues property</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setOptimistic-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setOptimistic</h4> |
| <pre>void setOptimistic(boolean optimistic)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>optimistic</code> - the value of the Optimistic flag.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getOptimistic--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getOptimistic</h4> |
| <pre>boolean getOptimistic()</pre> |
| <div class="block">Optimistic transactions do not hold data store locks until commit time.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the value of the Optimistic property.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getIsolationLevel--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getIsolationLevel</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getIsolationLevel()</pre> |
| <div class="block">Get the value for transaction isolation level for this transaction.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the transaction isolation level</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.2</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jdo/Transaction.html#setIsolationLevel-java.lang.String-"><code>setIsolationLevel(String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setIsolationLevel-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setIsolationLevel</h4> |
| <pre>void setIsolationLevel(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> level)</pre> |
| <div class="block">Set the value for transaction isolation level for this transaction. |
| Transaction isolation levels are defined in javax.jdo.Constants. |
| If the requested level is not available, but a higher level is |
| available, the higher level is silently used. |
| If the requested level is not available, and no higher level is |
| available, then JDOUnsupportedOptionException is thrown. |
| Five standard isolation levels are defined. Other isolation levels |
| might be supported by an implementation but are not standard. |
| <p>Standard values in order of low to high are: |
| <ul><li>read-uncommitted |
| </li><li>read-committed |
| </li><li>repeatable-read |
| </li><li>snapshot |
| </li><li>serializable |
| </li></ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>level</code> - the transaction isolation level</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.2</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../javax/jdo/Transaction.html#getIsolationLevel--"><code>getIsolationLevel()</code></a>, |
| <a href="../../javax/jdo/Constants.html#TX_READ_UNCOMMITTED"><code>Constants.TX_READ_UNCOMMITTED</code></a>, |
| <a href="../../javax/jdo/Constants.html#TX_READ_COMMITTED"><code>Constants.TX_READ_COMMITTED</code></a>, |
| <a href="../../javax/jdo/Constants.html#TX_REPEATABLE_READ"><code>Constants.TX_REPEATABLE_READ</code></a>, |
| <a href="../../javax/jdo/Constants.html#TX_SNAPSHOT"><code>Constants.TX_SNAPSHOT</code></a>, |
| <a href="../../javax/jdo/Constants.html#TX_SERIALIZABLE"><code>Constants.TX_SERIALIZABLE</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setSynchronization-javax.transaction.Synchronization-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSynchronization</h4> |
| <pre>void setSynchronization(<a href="https://docs.oracle.com/javase/8/docs/api/javax/transaction/Synchronization.html?is-external=true" title="class or interface in javax.transaction">Synchronization</a> sync)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sync</code> - the <code>Synchronization</code> instance to be notified; |
| <code>null</code> for none</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSynchronization--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSynchronization</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/javax/transaction/Synchronization.html?is-external=true" title="class or interface in javax.transaction">Synchronization</a> getSynchronization()</pre> |
| <div class="block">The user-specified <code>Synchronization</code> instance for this |
| <code>Transaction</code> instance.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the user-specified <code>Synchronization</code> instance.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getPersistenceManager--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPersistenceManager</h4> |
| <pre><a href="../../javax/jdo/PersistenceManager.html" title="interface in javax.jdo">PersistenceManager</a> getPersistenceManager()</pre> |
| <div class="block">The <code>Transaction</code> instance is always associated with exactly |
| one <code>PersistenceManager</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the <code>PersistenceManager</code> for this |
| <code>Transaction</code> instance</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setSerializeRead-java.lang.Boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSerializeRead</h4> |
| <pre>void setSerializeRead(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> serialize)</pre> |
| <div class="block">If <code>true</code>, a lock will be applied to all objects read in this |
| transaction. |
| <P>If <code>false</code> then retrieved objects will not be locked. |
| If null will fallback to the value for metadata for the class in question.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>serialize</code> - the value of the serializeRead property</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSerializeRead--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getSerializeRead</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> getSerializeRead()</pre> |
| <div class="block">Return the current value of the serializeRead property.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the value of the serializeRead property</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Transaction.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../index-all.html">Index</a></li> |
| <li><a href="../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../javax/jdo/Query.html" title="interface in javax.jdo"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../index.html?javax/jdo/Transaction.html" target="_top">Frames</a></li> |
| <li><a href="Transaction.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2005–2022 <a href="http://www.apache.org">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |