blob: 4194c1cf2fdb6d30e85535effad894106c6f3ed9 [file] [log] [blame]
<!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 (1.8.0_252) on Fri Jul 16 09:39:04 UTC 2021 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>UnitOfWork (EclipseLink 3.0.2, API Reference)</title>
<meta name="date" content="2021-07-16">
<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="UnitOfWork (EclipseLink 3.0.2, API Reference)";
}
}
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,"i23":6,"i24":6,"i25":6,"i26":6,"i27":6,"i28":6,"i29":6,"i30":6,"i31":6,"i32":6,"i33":6,"i34":6,"i35":6,"i36":6,"i37":6,"i38":6,"i39":6,"i40":6,"i41":6,"i42":6,"i43":6,"i44":6,"i45":6,"i46":6,"i47":6,"i48":6,"i49":6,"i50":6,"i51":6,"i52":6,"i53":6,"i54":6,"i55":6,"i56":6,"i57":6,"i58":6,"i59":6,"i60":6,"i61":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="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 class="aboutLanguage">EclipseLink 3.0.2, API Reference</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/eclipse/persistence/sessions/SessionProfilerAdapter.html" title="class in org.eclipse.persistence.sessions"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.CommitOrderType.html" title="enum in org.eclipse.persistence.sessions"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/eclipse/persistence/sessions/UnitOfWork.html" target="_top">Frames</a></li>
<li><a href="UnitOfWork.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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">org.eclipse.persistence.sessions</div>
<h2 title="Interface UnitOfWork" class="title">Interface UnitOfWork</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../org/eclipse/persistence/core/sessions/CoreSession.html" title="interface in org.eclipse.persistence.core.sessions">CoreSession</a>&lt;<a href="../../../../org/eclipse/persistence/descriptors/ClassDescriptor.html" title="class in org.eclipse.persistence.descriptors">ClassDescriptor</a>,<a href="../../../../org/eclipse/persistence/sessions/Login.html" title="interface in org.eclipse.persistence.sessions">Login</a>,org.eclipse.persistence.internal.databaseaccess.Platform,<a href="../../../../org/eclipse/persistence/sessions/Project.html" title="class in org.eclipse.persistence.sessions">Project</a>,<a href="../../../../org/eclipse/persistence/sessions/SessionEventManager.html" title="class in org.eclipse.persistence.sessions">SessionEventManager</a>&gt;, <a href="../../../../org/eclipse/persistence/sessions/Session.html" title="interface in org.eclipse.persistence.sessions">Session</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">UnitOfWork</span>
extends <a href="../../../../org/eclipse/persistence/sessions/Session.html" title="interface in org.eclipse.persistence.sessions">Session</a></pre>
<div class="block"><b>Purpose</b>: To allow object level transactions. This class represents the public API of the
unit of work and should be used to maintain complete compatibility.
<p>
<b>Description</b>: The unit of work is a session that implements all of the normal
protocol of an EclipseLink session. It can be spawned from any other session including another unit of work.
Objects can be brought into the unit of work through reading them or through registering them.
The unit of work will operate on its own object space, that is the objects within the unit of work
will be clones of the original objects. When the unit of work is committed, all changes to any objects
registered within the unit of work will be committed to the database. A minimal commit/update will
be performed and any foreign keys/circular reference/referential integrity will be resolved.
If the commit to the database is successful the changed objects will be merged back into the unit of work
parent session.
<p>
<b>Responsibilities</b>:
<ul>
<li> Allow parallel transactions against a session's objects.
<li> Allow nested transactions.
<li> Not require the application to write objects that is changes, automatically determine what has changed.
<li> Perform a minimal commit/update of all changes that occurred.
<li> Resolve foreign keys for newly created objects and maintain referential integrity.
<li> Allow for the object transaction to use its own object space.
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.CommitOrderType.html" title="enum in org.eclipse.persistence.sessions">UnitOfWork.CommitOrderType</a></span></code>
<div class="block">Defines the ordering of updates and deletes of a set of the same entity type during a commit or flush operation.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== 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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</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="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#addReadOnlyClass-java.lang.Class-">addReadOnlyClass</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;theClass)</code>
<div class="block">PUBLIC:
Adds the given Java class to the receiver's set of read-only classes.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#addReadOnlyClasses-java.util.Collection-">addReadOnlyClasses</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;classes)</code>
<div class="block">PUBLIC:
Adds the classes in the given Vector to the existing set of read-only classes.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#assignSequenceNumber-java.lang.Object-">assignSequenceNumber</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</code>
<div class="block">ADVANCED:
Assign sequence number to the object.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#assignSequenceNumbers--">assignSequenceNumbers</a></span>()</code>
<div class="block">ADVANCED:
Assign sequence numbers to all new objects registered in this unit of work,
or any new objects reference by any objects registered.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#beginEarlyTransaction--">beginEarlyTransaction</a></span>()</code>
<div class="block">PUBLIC:
Tell the unit of work to begin a transaction now.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commit--">commit</a></span>()</code>
<div class="block">PUBLIC:
Commit the unit of work to its parent.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commitAndResume--">commitAndResume</a></span>()</code>
<div class="block">PUBLIC:
Commit the unit of work to its parent.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commitAndResumeOnFailure--">commitAndResumeOnFailure</a></span>()</code>
<div class="block">PUBLIC:
Commit the unit of work to its parent.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#deepMergeClone-java.lang.Object-">deepMergeClone</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;rmiClone)</code>
<div class="block">PUBLIC:
Merge the attributes of the clone into the unit of work copy.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#deepRevertObject-java.lang.Object-">deepRevertObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</code>
<div class="block">PUBLIC:
Revert the object's attributes from the parent.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#deepUnregisterObject-java.lang.Object-">deepUnregisterObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</code>
<div class="block">ADVANCED:
Unregister the object with the unit of work.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#deleteAllObjects-java.util.Collection-">deleteAllObjects</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;domainObjects)</code>
<div class="block">PUBLIC:
Delete all of the objects and all of their privately owned parts in the database.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#deleteObject-java.lang.Object-">deleteObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;domainObject)</code>
<div class="block">PUBLIC:
Delete the object and all of their privately owned parts in the database.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#dontPerformValidation--">dontPerformValidation</a></span>()</code>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#forceUpdateToVersionField-java.lang.Object-boolean-">forceUpdateToVersionField</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;cloneFromUOW,
boolean&nbsp;shouldModifyVersionField)</code>
<div class="block">ADVANCED:
Set optimistic read lock on the object.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.CommitOrderType.html" title="enum in org.eclipse.persistence.sessions">UnitOfWork.CommitOrderType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#getCommitOrder--">getCommitOrder</a></span>()</code>
<div class="block">ADVANCED:
Return the commit order.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../../../org/eclipse/persistence/sessions/changesets/UnitOfWorkChangeSet.html" title="interface in org.eclipse.persistence.sessions.changesets">UnitOfWorkChangeSet</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#getCurrentChanges--">getCurrentChanges</a></span>()</code>
<div class="block">ADVANCED:
This method will calculate the changes for the UnitOfWork.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#getOriginalVersionOfObject-java.lang.Object-">getOriginalVersionOfObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;workingClone)</code>
<div class="block">ADVANCED:
Return the original version of the object(clone) from the parent's identity map.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>org.eclipse.persistence.internal.sessions.AbstractSession</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#getParent--">getParent</a></span>()</code>
<div class="block">PUBLIC:
Return the parent.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#getReadOnlyClasses--">getReadOnlyClasses</a></span>()</code>
<div class="block">ADVANCED:
Returns the set of read-only classes in this UnitOfWork.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#getReference-java.lang.Class-java.lang.Object-">getReference</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;theClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;primaryKey)</code>
<div class="block">Get an instance, whose state may be lazily fetched.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/eclipse/persistence/sessions/changesets/UnitOfWorkChangeSet.html" title="interface in org.eclipse.persistence.sessions.changesets">UnitOfWorkChangeSet</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#getUnitOfWorkChangeSet--">getUnitOfWorkChangeSet</a></span>()</code>
<div class="block">ADVANCED:
Returns the currentChangeSet from the UnitOfWork.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#getValidationLevel--">getValidationLevel</a></span>()</code>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#hasChanges--">hasChanges</a></span>()</code>
<div class="block">ADVANCED:
The Unit of work is capable of preprocessing to determine if any on the clone have been changed.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#isActive--">isActive</a></span>()</code>
<div class="block">PUBLIC:
Return if the unit of work is active (has not been released).</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#isClassReadOnly-java.lang.Class-">isClassReadOnly</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;theClass)</code>
<div class="block">PUBLIC:
Checks to see if the specified class is read-only or not in this UnitOfWork.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#isNestedUnitOfWork--">isNestedUnitOfWork</a></span>()</code>
<div class="block">ADVANCED:
Return if this session is a nested unit of work.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#isObjectRegistered-java.lang.Object-">isObjectRegistered</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</code>
<div class="block">ADVANCED:
Return whether the clone object is already registered.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#mergeClone-java.lang.Object-">mergeClone</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;rmiClone)</code>
<div class="block">PUBLIC:
Merge the attributes of the clone into the unit of work copy.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#mergeCloneWithReferences-java.lang.Object-">mergeCloneWithReferences</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;rmiClone)</code>
<div class="block">PUBLIC:
Merge the attributes of the clone into the unit of work copy.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#newInstance-java.lang.Class-">newInstance</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;theClass)</code>
<div class="block">PUBLIC:
Return a new instance of the class registered in this unit of work.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#performFullValidation--">performFullValidation</a></span>()</code>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#performPartialValidation--">performPartialValidation</a></span>()</code>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#printRegisteredObjects--">printRegisteredObjects</a></span>()</code>
<div class="block">PUBLIC:
Print the objects in the unit of work.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#refreshAndLockObject-java.lang.Object-">refreshAndLockObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</code>
<div class="block">PUBLIC:
Refresh the attributes of the object and of all of its private parts from the database.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#refreshAndLockObject-java.lang.Object-short-">refreshAndLockObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object,
short&nbsp;lockMode)</code>
<div class="block">PUBLIC:
Refresh the attributes of the object and of all of its private parts from the database.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Vector.html?is-external=true" title="class or interface in java.util">Vector</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#registerAllObjects-java.util.Collection-">registerAllObjects</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;domainObjects)</code>
<div class="block">PUBLIC:
Register the objects with the unit of work.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#registerExistingObject-java.lang.Object-">registerExistingObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;existingObject)</code>
<div class="block">ADVANCED:
Register the existing object with the unit of work.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#registerNewObject-java.lang.Object-">registerNewObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;newObject)</code>
<div class="block">ADVANCED:
Register the new object with the unit of work.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#registerObject-java.lang.Object-">registerObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;domainObject)</code>
<div class="block">PUBLIC:
Register the object with the unit of work.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#release--">release</a></span>()</code>
<div class="block">PUBLIC:
Release the unit of work.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#removeAllReadOnlyClasses--">removeAllReadOnlyClasses</a></span>()</code>
<div class="block">PUBLIC:
Empties the set of read-only classes.</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#removeForceUpdateToVersionField-java.lang.Object-">removeForceUpdateToVersionField</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;cloneFromUOW)</code>
<div class="block">ADVANCED:
Remove optimistic read lock from the object
See forceUpdateToVersionField(Object)</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#removeReadOnlyClass-java.lang.Class-">removeReadOnlyClass</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;theClass)</code>
<div class="block">PUBLIC:
Removes a Class from the receiver's set of read-only classes.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#revertAndResume--">revertAndResume</a></span>()</code>
<div class="block">PUBLIC:
Revert all changes made to any registered object.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#revertObject-java.lang.Object-">revertObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</code>
<div class="block">PUBLIC:
Revert the object's attributes from the parent.</div>
</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#setCommitOrder-org.eclipse.persistence.sessions.UnitOfWork.CommitOrderType-">setCommitOrder</a></span>(<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.CommitOrderType.html" title="enum in org.eclipse.persistence.sessions">UnitOfWork.CommitOrderType</a>&nbsp;order)</code>
<div class="block">ADVANCED:
Set the commit order.</div>
</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#setShouldNewObjectsBeCached-boolean-">setShouldNewObjectsBeCached</a></span>(boolean&nbsp;shouldNewObjectsBeCached)</code>
<div class="block">ADVANCED:
By default new objects are not cached until the exist on the database.</div>
</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#setShouldPerformDeletesFirst-boolean-">setShouldPerformDeletesFirst</a></span>(boolean&nbsp;shouldPerformDeletesFirst)</code>
<div class="block">ADVANCED:
By default deletes are performed last in a unit of work.</div>
</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#setShouldThrowConformExceptions-int-">setShouldThrowConformExceptions</a></span>(int&nbsp;shouldThrowExceptions)</code>
<div class="block">ADVANCED:
Conforming queries can be set to provide different levels of detail about the
exceptions they encounter
There are two levels:<br>
DO_NOT_THROW_CONFORM_EXCEPTIONS = 0;<br>
THROW_ALL_CONFORM_EXCEPTIONS = 1;</div>
</td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#setValidationLevel-int-">setValidationLevel</a></span>(int&nbsp;validationLevel)</code>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.</div>
</td>
</tr>
<tr id="i51" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shallowMergeClone-java.lang.Object-">shallowMergeClone</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;rmiClone)</code>
<div class="block">PUBLIC:
Merge the attributes of the clone into the unit of work copy.</div>
</td>
</tr>
<tr id="i52" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shallowRevertObject-java.lang.Object-">shallowRevertObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</code>
<div class="block">PUBLIC:
Revert the object's attributes from the parent.</div>
</td>
</tr>
<tr id="i53" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shallowUnregisterObject-java.lang.Object-">shallowUnregisterObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</code>
<div class="block">ADVANCED:
Unregister the object with the unit of work.</div>
</td>
</tr>
<tr id="i54" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shouldNewObjectsBeCached--">shouldNewObjectsBeCached</a></span>()</code>
<div class="block">ADVANCED:
By default new objects are not cached until the exist on the database.</div>
</td>
</tr>
<tr id="i55" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shouldPerformDeletesFirst--">shouldPerformDeletesFirst</a></span>()</code>
<div class="block">ADVANCED:
By default all objects are inserted and updated in the database before
any object is deleted.</div>
</td>
</tr>
<tr id="i56" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shouldPerformFullValidation--">shouldPerformFullValidation</a></span>()</code>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.</div>
</td>
</tr>
<tr id="i57" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shouldPerformNoValidation--">shouldPerformNoValidation</a></span>()</code>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.</div>
</td>
</tr>
<tr id="i58" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shouldPerformPartialValidation--">shouldPerformPartialValidation</a></span>()</code>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.</div>
</td>
</tr>
<tr id="i59" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#unregisterObject-java.lang.Object-">unregisterObject</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</code>
<div class="block">ADVANCED:
Unregister the object with the unit of work.</div>
</td>
</tr>
<tr id="i60" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#validateObjectSpace--">validateObjectSpace</a></span>()</code>
<div class="block">ADVANCED:
This can be used to help debugging an object-space corruption.</div>
</td>
</tr>
<tr id="i61" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#writeChanges--">writeChanges</a></span>()</code>
<div class="block">ADVANCED: Writes all changes now before commit().</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.eclipse.persistence.sessions.Session">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.eclipse.persistence.sessions.<a href="../../../../org/eclipse/persistence/sessions/Session.html" title="interface in org.eclipse.persistence.sessions">Session</a></h3>
<code><a href="../../../../org/eclipse/persistence/sessions/Session.html#acquireHistoricalSession-org.eclipse.persistence.history.AsOfClause-">acquireHistoricalSession</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#acquireUnitOfWork--">acquireUnitOfWork</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#acquireUnitOfWork-org.eclipse.persistence.config.ReferenceMode-">acquireUnitOfWork</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#addJPAQuery-org.eclipse.persistence.queries.DatabaseQuery-">addJPAQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#addQuery-java.lang.String-org.eclipse.persistence.queries.DatabaseQuery-">addQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#clearIntegrityChecker--">clearIntegrityChecker</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#clearProfile--">clearProfile</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#containsQuery-java.lang.String-">containsQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#copy-java.lang.Object-">copy</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#copy-java.lang.Object-org.eclipse.persistence.queries.AttributeGroup-">copy</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#doesObjectExist-java.lang.Object-">doesObjectExist</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#dontLogMessages--">dontLogMessages</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeNonSelectingCall-org.eclipse.persistence.queries.Call-">executeNonSelectingCall</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeNonSelectingSQL-java.lang.String-">executeNonSelectingSQL</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-org.eclipse.persistence.queries.DatabaseQuery-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-org.eclipse.persistence.queries.DatabaseQuery-java.util.List-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-java.lang.String-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-java.lang.String-java.lang.Class-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-java.lang.String-java.lang.Class-java.util.List-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-java.lang.String-java.lang.Class-java.lang.Object-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-java.lang.String-java.lang.Class-java.lang.Object-java.lang.Object-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-java.lang.String-java.lang.Class-java.lang.Object-java.lang.Object-java.lang.Object-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-java.lang.String-java.util.List-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-java.lang.String-java.lang.Object-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-java.lang.String-java.lang.Object-java.lang.Object-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeQuery-java.lang.String-java.lang.Object-java.lang.Object-java.lang.Object-">executeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeSelectingCall-org.eclipse.persistence.queries.Call-">executeSelectingCall</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#executeSQL-java.lang.String-">executeSQL</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getActiveSession--">getActiveSession</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getActiveUnitOfWork--">getActiveUnitOfWork</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getAsOfClause--">getAsOfClause</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getClassDescriptor-java.lang.Class-">getClassDescriptor</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getClassDescriptor-java.lang.Object-">getClassDescriptor</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getClassDescriptorForAlias-java.lang.String-">getClassDescriptorForAlias</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getDatasourceLogin--">getDatasourceLogin</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getDatasourcePlatform--">getDatasourcePlatform</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getDefaultReferenceMode--">getDefaultReferenceMode</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getDescriptor-java.lang.Class-">getDescriptor</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getDescriptor-java.lang.Object-">getDescriptor</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getDescriptorForAlias-java.lang.String-">getDescriptorForAlias</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getDescriptors--">getDescriptors</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getEventManager--">getEventManager</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getExceptionHandler--">getExceptionHandler</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getExternalTransactionController--">getExternalTransactionController</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getId-java.lang.Object-">getId</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getIdentityMapAccessor--">getIdentityMapAccessor</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getIntegrityChecker--">getIntegrityChecker</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getJPAQueries--">getJPAQueries</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getLog--">getLog</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getLogin--">getLogin</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getLogLevel--">getLogLevel</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getLogLevel-java.lang.String-">getLogLevel</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getName--">getName</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getNextSequenceNumberValue-java.lang.Class-">getNextSequenceNumberValue</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getPartitioningPolicy--">getPartitioningPolicy</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getPlatform--">getPlatform</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getProfiler--">getProfiler</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getProject--">getProject</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getProperties--">getProperties</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getProperty-java.lang.String-">getProperty</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getQueries--">getQueries</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getQuery-java.lang.String-">getQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getQuery-java.lang.String-java.util.List-">getQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getSerializer--">getSerializer</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getServerPlatform--">getServerPlatform</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#getSessionLog--">getSessionLog</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#handleException-java.lang.RuntimeException-">handleException</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#handleSevere-java.lang.RuntimeException-">handleSevere</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#hasDescriptor-java.lang.Class-">hasDescriptor</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#hasExceptionHandler--">hasExceptionHandler</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#hasExternalTransactionController--">hasExternalTransactionController</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isClientSession--">isClientSession</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isConnected--">isConnected</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isDatabaseSession--">isDatabaseSession</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isDistributedSession--">isDistributedSession</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isFinalizersEnabled--">isFinalizersEnabled</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isInProfile--">isInProfile</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isRemoteSession--">isRemoteSession</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isRemoteUnitOfWork--">isRemoteUnitOfWork</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isServerSession--">isServerSession</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isSessionBroker--">isSessionBroker</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#isUnitOfWork--">isUnitOfWork</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#log-org.eclipse.persistence.logging.SessionLogEntry-">log</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#logMessage-java.lang.String-">logMessage</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#readAllObjects-java.lang.Class-">readAllObjects</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#readAllObjects-java.lang.Class-org.eclipse.persistence.queries.Call-">readAllObjects</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#readAllObjects-java.lang.Class-org.eclipse.persistence.expressions.Expression-">readAllObjects</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#readObject-java.lang.Class-">readObject</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#readObject-java.lang.Class-org.eclipse.persistence.queries.Call-">readObject</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#readObject-java.lang.Class-org.eclipse.persistence.expressions.Expression-">readObject</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#readObject-java.lang.Object-">readObject</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#refreshObject-java.lang.Object-">refreshObject</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#removeProperty-java.lang.String-">removeProperty</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#removeQuery-java.lang.String-">removeQuery</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setDefaultReferenceMode-org.eclipse.persistence.config.ReferenceMode-">setDefaultReferenceMode</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setExceptionHandler-org.eclipse.persistence.exceptions.ExceptionHandler-">setExceptionHandler</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setExternalTransactionController-org.eclipse.persistence.sessions.ExternalTransactionController-">setExternalTransactionController</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setIntegrityChecker-org.eclipse.persistence.exceptions.IntegrityChecker-">setIntegrityChecker</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setIsFinalizersEnabled-boolean-">setIsFinalizersEnabled</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setLog-java.io.Writer-">setLog</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setLogLevel-int-">setLogLevel</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setName-java.lang.String-">setName</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setPartitioningPolicy-org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy-">setPartitioningPolicy</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setProfiler-org.eclipse.persistence.sessions.SessionProfiler-">setProfiler</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setProperty-java.lang.String-java.lang.Object-">setProperty</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setQueryTimeoutDefault-int-">setQueryTimeoutDefault</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setQueryTimeoutUnitDefault-java.util.concurrent.TimeUnit-">setQueryTimeoutUnitDefault</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setSerializer-org.eclipse.persistence.sessions.serializers.Serializer-">setSerializer</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#setSessionLog-org.eclipse.persistence.logging.SessionLog-">setSessionLog</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#shouldLog-int-java.lang.String-">shouldLog</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#shouldLogMessages--">shouldLogMessages</a>, <a href="../../../../org/eclipse/persistence/sessions/Session.html#validateCache--">validateCache</a></code></li>
</ul>
</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="getReadOnlyClasses--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadOnlyClasses</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&nbsp;getReadOnlyClasses()</pre>
<div class="block">ADVANCED:
Returns the set of read-only classes in this UnitOfWork.</div>
</li>
</ul>
<a name="addReadOnlyClass-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addReadOnlyClass</h4>
<pre>void&nbsp;addReadOnlyClass(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;theClass)</pre>
<div class="block">PUBLIC:
Adds the given Java class to the receiver's set of read-only classes.
Cannot be called after objects have been registered in the unit of work.</div>
</li>
</ul>
<a name="addReadOnlyClasses-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addReadOnlyClasses</h4>
<pre>void&nbsp;addReadOnlyClasses(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;classes)</pre>
<div class="block">PUBLIC:
Adds the classes in the given Vector to the existing set of read-only classes.
Cannot be called after objects have been registered in the unit of work.</div>
</li>
</ul>
<a name="assignSequenceNumber-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assignSequenceNumber</h4>
<pre>void&nbsp;assignSequenceNumber(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)
throws <a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a></pre>
<div class="block">ADVANCED:
Assign sequence number to the object.
This allows for an object's id to be assigned before commit.
It can be used if the application requires to use the object id before the object exists on the database.
Normally all ids are assigned during the commit automatically.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a></code></dd>
</dl>
</li>
</ul>
<a name="assignSequenceNumbers--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assignSequenceNumbers</h4>
<pre>void&nbsp;assignSequenceNumbers()
throws <a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a></pre>
<div class="block">ADVANCED:
Assign sequence numbers to all new objects registered in this unit of work,
or any new objects reference by any objects registered.
This allows for an object's id to be assigned before commit.
It can be used if the application requires to use the object id before the object exists on the database.
Normally all ids are assigned during the commit automatically.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a></code></dd>
</dl>
</li>
</ul>
<a name="beginEarlyTransaction--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beginEarlyTransaction</h4>
<pre>void&nbsp;beginEarlyTransaction()
throws <a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a></pre>
<div class="block">PUBLIC:
Tell the unit of work to begin a transaction now.
By default the unit of work will begin a transaction at commit time.
The default is the recommended approach, however sometimes it is
necessary to start the transaction before commit time. When the
unit of work commits, this transaction will be committed.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commit--"><code>commit()</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#release--"><code>release()</code></a></dd>
</dl>
</li>
</ul>
<a name="commit--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>commit</h4>
<pre>void&nbsp;commit()
throws <a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a>,
<a href="../../../../org/eclipse/persistence/exceptions/OptimisticLockException.html" title="class in org.eclipse.persistence.exceptions">OptimisticLockException</a></pre>
<div class="block">PUBLIC:
Commit the unit of work to its parent.
For a nested unit of work this will merge any changes to its objects
with its parents.
For a first level unit of work it will commit all changes to its objects
to the database as a single transaction. If successful the changes to its
objects will be merged to its parent's objects. If the commit fails the database
transaction will be rolledback, and the unit of work will be released.
If the commit is successful the unit of work is released, and a new unit of work
must be acquired if further changes are desired.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a></code></dd>
<dd><code><a href="../../../../org/eclipse/persistence/exceptions/OptimisticLockException.html" title="class in org.eclipse.persistence.exceptions">OptimisticLockException</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commitAndResumeOnFailure--"><code>commitAndResumeOnFailure()</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commitAndResume--"><code>commitAndResume()</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#release--"><code>release()</code></a></dd>
</dl>
</li>
</ul>
<a name="commitAndResume--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>commitAndResume</h4>
<pre>void&nbsp;commitAndResume()
throws <a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a>,
<a href="../../../../org/eclipse/persistence/exceptions/OptimisticLockException.html" title="class in org.eclipse.persistence.exceptions">OptimisticLockException</a></pre>
<div class="block">PUBLIC:
Commit the unit of work to its parent.
For a nested unit of work this will merge any changes to its objects
with its parents.
For a first level unit of work it will commit all changes to its objects
to the database as a single transaction. If successful the changes to its
objects will be merged to its parent's objects. If the commit fails the database
transaction will be rolledback, and the unit of work will be released.
The normal commit releases the unit of work, forcing a new one to be acquired if further changes are desired.
The resuming feature allows for the same unit of work (and working copies) to be continued to be used.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a></code></dd>
<dd><code><a href="../../../../org/eclipse/persistence/exceptions/OptimisticLockException.html" title="class in org.eclipse.persistence.exceptions">OptimisticLockException</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commitAndResumeOnFailure--"><code>commitAndResumeOnFailure()</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commit--"><code>commit()</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#release--"><code>release()</code></a></dd>
</dl>
</li>
</ul>
<a name="commitAndResumeOnFailure--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>commitAndResumeOnFailure</h4>
<pre>void&nbsp;commitAndResumeOnFailure()
throws <a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a>,
<a href="../../../../org/eclipse/persistence/exceptions/OptimisticLockException.html" title="class in org.eclipse.persistence.exceptions">OptimisticLockException</a></pre>
<div class="block">PUBLIC:
Commit the unit of work to its parent.
For a nested unit of work this will merge any changes to its objects
with its parents.
For a first level unit of work it will commit all changes to its objects
to the database as a single transaction. If successful the changes to its
objects will be merged to its parent's objects. If the commit fails the database
transaction will be rolledback, but the unit of work will remain active.
It can then be retried or released.
The normal commit failure releases the unit of work, forcing a new one to be acquired if further changes are desired.
The resuming feature allows for the same unit of work (and working copies) to be continued to be used if an error occurs.
The UnitOfWork will also remain active if the commit is successful.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/eclipse/persistence/exceptions/DatabaseException.html" title="class in org.eclipse.persistence.exceptions">DatabaseException</a></code></dd>
<dd><code><a href="../../../../org/eclipse/persistence/exceptions/OptimisticLockException.html" title="class in org.eclipse.persistence.exceptions">OptimisticLockException</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commit--"><code>commit()</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#release--"><code>release()</code></a></dd>
</dl>
</li>
</ul>
<a name="deepMergeClone-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deepMergeClone</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;deepMergeClone(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;rmiClone)</pre>
<div class="block">PUBLIC:
Merge the attributes of the clone into the unit of work copy.
This can be used for objects that are returned from the client through
RMI serialization or other serialization mechanisms, because the RMI object will
be a clone this will merge its attributes correctly to preserve object identity
within the unit of work and record its changes.
Everything connected to this object (i.e. the entire object tree where rmiClone
is the root) is also merged.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the registered version for the clone being merged.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#mergeClone-java.lang.Object-"><code>mergeClone(Object)</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shallowMergeClone-java.lang.Object-"><code>shallowMergeClone(Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="deepRevertObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deepRevertObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;deepRevertObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</pre>
<div class="block">PUBLIC:
Revert the object's attributes from the parent.
This reverts everything the object references.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the object reverted.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#revertObject-java.lang.Object-"><code>revertObject(Object)</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shallowRevertObject-java.lang.Object-"><code>shallowRevertObject(Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="deepUnregisterObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deepUnregisterObject</h4>
<pre>void&nbsp;deepUnregisterObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</pre>
<div class="block">ADVANCED:
Unregister the object with the unit of work.
This can be used to delete an object that was just created and is not yet persistent.
Delete object can also be used, but will result in inserting the object and then deleting it.
The method should be used carefully because it will delete all the reachable parts.</div>
</li>
</ul>
<a name="deleteAllObjects-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteAllObjects</h4>
<pre>void&nbsp;deleteAllObjects(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;domainObjects)</pre>
<div class="block">PUBLIC:
Delete all of the objects and all of their privately owned parts in the database.
Delete operations are delayed in a unit of work until commit.</div>
</li>
</ul>
<a name="deleteObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;deleteObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;domainObject)</pre>
<div class="block">PUBLIC:
Delete the object and all of their privately owned parts in the database.
Delete operations are delayed in a unit of work until commit.</div>
</li>
</ul>
<a name="dontPerformValidation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dontPerformValidation</h4>
<pre>void&nbsp;dontPerformValidation()</pre>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.
The level of validation can be increased or decreased for debugging purposes or under
advanced situation where the application requires/desires to violate clone identity in the unit of work.
It is strongly suggested that clone identity not be violate in the unit of work.</div>
</li>
</ul>
<a name="forceUpdateToVersionField-java.lang.Object-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forceUpdateToVersionField</h4>
<pre>void&nbsp;forceUpdateToVersionField(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;cloneFromUOW,
boolean&nbsp;shouldModifyVersionField)</pre>
<div class="block">ADVANCED:
Set optimistic read lock on the object. This feature is override by normal optimistic lock.
when the object is changed in UnitOfWork. The cloneFromUOW must be the clone of from this
UnitOfWork and it must implements version locking or timestamp locking.
The SQL would look like the followings.
If shouldModifyVersionField is true,
"UPDATE EMPLOYEE SET VERSION = 2 WHERE EMP_ID = 9 AND VERSION = 1"
If shouldModifyVersionField is false,
"UPDATE EMPLOYEE SET VERSION = 1 WHERE EMP_ID = 9 AND VERSION = 1"</div>
</li>
</ul>
<a name="getCurrentChanges--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentChanges</h4>
<pre><a href="../../../../org/eclipse/persistence/sessions/changesets/UnitOfWorkChangeSet.html" title="interface in org.eclipse.persistence.sessions.changesets">UnitOfWorkChangeSet</a>&nbsp;getCurrentChanges()</pre>
<div class="block">ADVANCED:
This method will calculate the changes for the UnitOfWork. Without assigning sequence numbers.
This is a computationaly intensive operation and should be avoided unless necessary.
A valid changeSet, with sequence numbers can be collected from the UnitOfWork after the commit
is complete by calling unitOfWork.getUnitOfWorkChangeSet().</div>
</li>
</ul>
<a name="getOriginalVersionOfObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOriginalVersionOfObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;getOriginalVersionOfObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;workingClone)</pre>
<div class="block">ADVANCED:
Return the original version of the object(clone) from the parent's identity map.</div>
</li>
</ul>
<a name="getParent--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParent</h4>
<pre>org.eclipse.persistence.internal.sessions.AbstractSession&nbsp;getParent()</pre>
<div class="block">PUBLIC:
Return the parent.
This is a unit of work if nested, otherwise a database session or client session.</div>
</li>
</ul>
<a name="getUnitOfWorkChangeSet--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUnitOfWorkChangeSet</h4>
<pre><a href="../../../../org/eclipse/persistence/sessions/changesets/UnitOfWorkChangeSet.html" title="interface in org.eclipse.persistence.sessions.changesets">UnitOfWorkChangeSet</a>&nbsp;getUnitOfWorkChangeSet()</pre>
<div class="block">ADVANCED:
Returns the currentChangeSet from the UnitOfWork.
This is only valid after the UnitOfWork has committed successfully</div>
</li>
</ul>
<a name="getValidationLevel--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValidationLevel</h4>
<pre>int&nbsp;getValidationLevel()</pre>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.
The level of validation can be increased or decreased for debugging purposes or under
advanced situation where the application requires/desires to violate clone identity in the unit of work.
It is strongly suggested that clone identity not be violate in the unit of work.</div>
</li>
</ul>
<a name="hasChanges--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasChanges</h4>
<pre>boolean&nbsp;hasChanges()</pre>
<div class="block">ADVANCED:
The Unit of work is capable of preprocessing to determine if any on the clone have been changed.
This is computationally expensive and should be avoided on large object graphs.</div>
</li>
</ul>
<a name="isActive--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isActive</h4>
<pre>boolean&nbsp;isActive()</pre>
<div class="block">PUBLIC:
Return if the unit of work is active (has not been released).</div>
</li>
</ul>
<a name="isClassReadOnly-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isClassReadOnly</h4>
<pre>boolean&nbsp;isClassReadOnly(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;theClass)</pre>
<div class="block">PUBLIC:
Checks to see if the specified class is read-only or not in this UnitOfWork.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the class is read-only, false otherwise.</dd>
</dl>
</li>
</ul>
<a name="isObjectRegistered-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isObjectRegistered</h4>
<pre>boolean&nbsp;isObjectRegistered(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</pre>
<div class="block">ADVANCED:
Return whether the clone object is already registered.</div>
</li>
</ul>
<a name="isNestedUnitOfWork--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNestedUnitOfWork</h4>
<pre>boolean&nbsp;isNestedUnitOfWork()</pre>
<div class="block">ADVANCED:
Return if this session is a nested unit of work.</div>
</li>
</ul>
<a name="mergeClone-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mergeClone</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;mergeClone(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;rmiClone)</pre>
<div class="block">PUBLIC:
Merge the attributes of the clone into the unit of work copy.
This can be used for objects that are returned from the client through
RMI serialization (or another serialization mechanism), because the RMI object
will be a clone this will merge its attributes correctly to preserve object
identity within the unit of work and record its changes.
The object and its private owned parts are merged.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the registered version for the clone being merged.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shallowMergeClone-java.lang.Object-"><code>shallowMergeClone(Object)</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#deepMergeClone-java.lang.Object-"><code>deepMergeClone(Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="mergeCloneWithReferences-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mergeCloneWithReferences</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;mergeCloneWithReferences(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;rmiClone)</pre>
<div class="block">PUBLIC:
Merge the attributes of the clone into the unit of work copy.
This can be used for objects that are returned from the client through
RMI serialization (or another serialization mechanism), because the RMI object
will be a clone this will merge its attributes correctly to preserve object
identity within the unit of work and record its changes.
The object and its private owned parts are merged. This will include
references from this clone to independent objects.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the registered version for the clone being merged.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shallowMergeClone-java.lang.Object-"><code>shallowMergeClone(Object)</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#deepMergeClone-java.lang.Object-"><code>deepMergeClone(Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="newInstance-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newInstance</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;newInstance(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;theClass)</pre>
<div class="block">PUBLIC:
Return a new instance of the class registered in this unit of work.
This can be used to ensure that new objects are registered correctly.</div>
</li>
</ul>
<a name="performFullValidation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>performFullValidation</h4>
<pre>void&nbsp;performFullValidation()</pre>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.
The level of validation can be increased or decreased for debugging purposes or under
advanced situation where the application requires/desires to violate clone identity in the unit of work.
It is strongly suggested that clone identity not be violate in the unit of work.</div>
</li>
</ul>
<a name="performPartialValidation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>performPartialValidation</h4>
<pre>void&nbsp;performPartialValidation()</pre>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.
The level of validation can be increased or decreased for debugging purposes or under
advanced situation where the application requires/desires to violate clone identity in the unit of work.
It is strongly suggested that clone identity not be violate in the unit of work.</div>
</li>
</ul>
<a name="printRegisteredObjects--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printRegisteredObjects</h4>
<pre>void&nbsp;printRegisteredObjects()</pre>
<div class="block">PUBLIC:
Print the objects in the unit of work.</div>
</li>
</ul>
<a name="refreshAndLockObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>refreshAndLockObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;refreshAndLockObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</pre>
<div class="block">PUBLIC:
Refresh the attributes of the object and of all of its private parts from the database.
The object will be pessimistically locked on the database for the duration of the transaction.
If the object is already locked this method will wait until the lock is released.
A no wait option is available through setting the lock mode.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#refreshAndLockObject-java.lang.Object-short-"><code>refreshAndLockObject(Object, short)</code></a></dd>
</dl>
</li>
</ul>
<a name="refreshAndLockObject-java.lang.Object-short-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>refreshAndLockObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;refreshAndLockObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object,
short&nbsp;lockMode)</pre>
<div class="block">PUBLIC:
Refresh the attributes of the object and of all of its private parts from the database.
The object will be pessimistically locked on the database for the duration of the transaction.
<p>Lock Modes: ObjectBuildingQuery.NO_LOCK, LOCK, LOCK_NOWAIT</div>
</li>
</ul>
<a name="registerAllObjects-java.util.Collection-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerAllObjects</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Vector.html?is-external=true" title="class or interface in java.util">Vector</a>&nbsp;registerAllObjects(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&nbsp;domainObjects)</pre>
<div class="block">PUBLIC:
Register the objects with the unit of work.
All newly created root domain objects must be registered to be inserted on commit.
Also any existing objects that will be edited and were not read from this unit of work
must also be registered.
Once registered any changes to the objects will be committed to the database on commit.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>is the clones of the original objects, the return value must be used for editing,
editing the original is not allowed in the unit of work.</dd>
</dl>
</li>
</ul>
<a name="registerExistingObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerExistingObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;registerExistingObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;existingObject)</pre>
<div class="block">ADVANCED:
Register the existing object with the unit of work.
This is a advanced API that can be used if the application can guaranteed the object exists on the database.
When registerObject is called the unit of work determines existence through the descriptor's doesExist setting.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The clone of the original object, the return value must be used for editing.
Editing the original is not allowed in the unit of work.</dd>
</dl>
</li>
</ul>
<a name="registerNewObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerNewObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;registerNewObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;newObject)</pre>
<div class="block">ADVANCED:
Register the new object with the unit of work.
This will register the new object without cloning.
Normally the registerObject method should be used for all registration of new and existing objects.
This version of the register method can only be used for new objects.
This method should only be used if a new object is desired to be registered without cloning.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#registerObject-java.lang.Object-"><code>registerObject(Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="registerObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;registerObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;domainObject)</pre>
<div class="block">PUBLIC:
Register the object with the unit of work.
All newly created root domain objects must be registered to be inserted on commit.
Also any existing objects that will be edited and were not read from this unit of work
must also be registered.
Once registered any changes to the objects will be committed to the database on commit.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the clone of the original object, the return value must be used for editing,
** Editing the original is not allowed in the unit of work. **</dd>
</dl>
</li>
</ul>
<a name="release--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre>void&nbsp;release()</pre>
<div class="block">PUBLIC:
Release the unit of work.
This terminates this unit of work.
Because the unit of work operates on its own object space (clones) no work is required.
The unit of work should no longer be used or referenced by the application beyond this point
so that it can garbage collect.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/eclipse/persistence/sessions/Session.html#release--">release</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/eclipse/persistence/sessions/Session.html" title="interface in org.eclipse.persistence.sessions">Session</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commit--"><code>commit()</code></a></dd>
</dl>
</li>
</ul>
<a name="removeAllReadOnlyClasses--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeAllReadOnlyClasses</h4>
<pre>void&nbsp;removeAllReadOnlyClasses()</pre>
<div class="block">PUBLIC:
Empties the set of read-only classes.
It is illegal to call this method on nested UnitOfWork objects. A nested UnitOfWork
cannot have a subset of its parent's set of read-only classes.</div>
</li>
</ul>
<a name="removeForceUpdateToVersionField-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeForceUpdateToVersionField</h4>
<pre>void&nbsp;removeForceUpdateToVersionField(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;cloneFromUOW)</pre>
<div class="block">ADVANCED:
Remove optimistic read lock from the object
See forceUpdateToVersionField(Object)</div>
</li>
</ul>
<a name="removeReadOnlyClass-java.lang.Class-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeReadOnlyClass</h4>
<pre>void&nbsp;removeReadOnlyClass(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;theClass)</pre>
<div class="block">PUBLIC:
Removes a Class from the receiver's set of read-only classes.
It is illegal to try to send this method to a nested UnitOfWork.</div>
</li>
</ul>
<a name="revertAndResume--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>revertAndResume</h4>
<pre>void&nbsp;revertAndResume()</pre>
<div class="block">PUBLIC:
Revert all changes made to any registered object.
Clear all deleted and new objects.
Revert should not be confused with release which it the normal compliment to commit.
Revert is more similar to commit and resume, however reverts all changes and resumes.
If you do not require to resume the unit of work release should be used instead.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#commitAndResume--"><code>commitAndResume()</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#release--"><code>release()</code></a></dd>
</dl>
</li>
</ul>
<a name="revertObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>revertObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;revertObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</pre>
<div class="block">PUBLIC:
Revert the object's attributes from the parent.
This also reverts the object privately-owned parts.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the object reverted.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#shallowRevertObject-java.lang.Object-"><code>shallowRevertObject(Object)</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#deepRevertObject-java.lang.Object-"><code>deepRevertObject(Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="setShouldNewObjectsBeCached-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setShouldNewObjectsBeCached</h4>
<pre>void&nbsp;setShouldNewObjectsBeCached(boolean&nbsp;shouldNewObjectsBeCached)</pre>
<div class="block">ADVANCED:
By default new objects are not cached until the exist on the database.
Occasionally if mergeClone is used on new objects and is required to allow multiple merges
on the same new object, then if the new objects are not cached, each mergeClone will be
interpreted as a different new object.
By setting new objects to be cached mergeClone can be performed multiple times before commit.
New objects cannot be cached unless they have a valid assigned primary key before being registered.
New object with non-null invalid primary keys such as 0 or '' can cause problems and should not be used with this option.</div>
</li>
</ul>
<a name="setShouldPerformDeletesFirst-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setShouldPerformDeletesFirst</h4>
<pre>void&nbsp;setShouldPerformDeletesFirst(boolean&nbsp;shouldPerformDeletesFirst)</pre>
<div class="block">ADVANCED:
By default deletes are performed last in a unit of work.
Sometimes you may want to have the deletes performed before other actions.</div>
</li>
</ul>
<a name="setShouldThrowConformExceptions-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setShouldThrowConformExceptions</h4>
<pre>void&nbsp;setShouldThrowConformExceptions(int&nbsp;shouldThrowExceptions)</pre>
<div class="block">ADVANCED:
Conforming queries can be set to provide different levels of detail about the
exceptions they encounter
There are two levels:<br>
DO_NOT_THROW_CONFORM_EXCEPTIONS = 0;<br>
THROW_ALL_CONFORM_EXCEPTIONS = 1;</div>
</li>
</ul>
<a name="setValidationLevel-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setValidationLevel</h4>
<pre>void&nbsp;setValidationLevel(int&nbsp;validationLevel)</pre>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.
The level of validation can be increased or decreased for debugging purposes or under
advanced situation where the application requires/desires to violate clone identity in the unit of work.
It is strongly suggested that clone identity not be violate in the unit of work.</div>
</li>
</ul>
<a name="shallowMergeClone-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shallowMergeClone</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;shallowMergeClone(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;rmiClone)</pre>
<div class="block">PUBLIC:
Merge the attributes of the clone into the unit of work copy.
This can be used for objects that are returned from the client through
RMI serialization (or other serialization mechanisms), because the RMI object will
be a clone this will merge its attributes correctly to preserve object identity
within the unit of work and record its changes.
Only direct attributes are merged.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the registered version for the clone being merged.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#mergeClone-java.lang.Object-"><code>mergeClone(Object)</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#deepMergeClone-java.lang.Object-"><code>deepMergeClone(Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="shallowRevertObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shallowRevertObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;shallowRevertObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</pre>
<div class="block">PUBLIC:
Revert the object's attributes from the parent.
This only reverts the object's direct attributes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the object reverted.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#revertObject-java.lang.Object-"><code>revertObject(Object)</code></a>,
<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.html#deepRevertObject-java.lang.Object-"><code>deepRevertObject(Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="shallowUnregisterObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shallowUnregisterObject</h4>
<pre>void&nbsp;shallowUnregisterObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</pre>
<div class="block">ADVANCED:
Unregister the object with the unit of work.
This can be used to delete an object that was just created and is not yet persistent.
Delete object can also be used, but will result in inserting the object and then deleting it.
The method will only unregister the clone, none of its parts.</div>
</li>
</ul>
<a name="shouldNewObjectsBeCached--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldNewObjectsBeCached</h4>
<pre>boolean&nbsp;shouldNewObjectsBeCached()</pre>
<div class="block">ADVANCED:
By default new objects are not cached until the exist on the database.
Occasionally if mergeClone is used on new objects and is required to allow multiple merges
on the same new object, then if the new objects are not cached, each mergeClone will be
interpreted as a different new object.
By setting new objects to be cached mergeClone can be performed multiple times before commit.
New objects cannot be cached unless they have a valid assigned primary key before being registered.
New object with non-null invalid primary keys such as 0 or '' can cause problems and should not be used with this option.</div>
</li>
</ul>
<a name="shouldPerformDeletesFirst--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldPerformDeletesFirst</h4>
<pre>boolean&nbsp;shouldPerformDeletesFirst()</pre>
<div class="block">ADVANCED:
By default all objects are inserted and updated in the database before
any object is deleted. If this flag is set to true, deletes will be
performed before inserts and updates</div>
</li>
</ul>
<a name="shouldPerformFullValidation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldPerformFullValidation</h4>
<pre>boolean&nbsp;shouldPerformFullValidation()</pre>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.
The level of validation can be increased or decreased for debugging purposes or under
advanced situation where the application requires/desires to violate clone identity in the unit of work.
It is strongly suggested that clone identity not be violate in the unit of work.</div>
</li>
</ul>
<a name="shouldPerformNoValidation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldPerformNoValidation</h4>
<pre>boolean&nbsp;shouldPerformNoValidation()</pre>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.
The level of validation can be increased or decreased for debugging purposes or under
advanced situation where the application requires/desires to violate clone identity in the unit of work.
It is strongly suggested that clone identity not be violate in the unit of work.</div>
</li>
</ul>
<a name="shouldPerformPartialValidation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldPerformPartialValidation</h4>
<pre>boolean&nbsp;shouldPerformPartialValidation()</pre>
<div class="block">ADVANCED:
The unit of work performs validations such as,
ensuring multiple copies of the same object don't exist in the same unit of work,
ensuring deleted objects are not referred after commit,
ensures that objects from the parent cache are not referred in the unit of work cache.
The level of validation can be increased or decreased for debugging purposes or under
advanced situation where the application requires/desires to violate clone identity in the unit of work.
It is strongly suggested that clone identity not be violate in the unit of work.</div>
</li>
</ul>
<a name="unregisterObject-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unregisterObject</h4>
<pre>void&nbsp;unregisterObject(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;clone)</pre>
<div class="block">ADVANCED:
Unregister the object with the unit of work.
This can be used to delete an object that was just created and is not yet persistent.
Delete object can also be used, but will result in inserting the object and then deleting it.
The method will only unregister private owned parts</div>
</li>
</ul>
<a name="validateObjectSpace--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>validateObjectSpace</h4>
<pre>void&nbsp;validateObjectSpace()</pre>
<div class="block">ADVANCED:
This can be used to help debugging an object-space corruption.
An object-space corruption is when your application has incorrectly related a clone to an original object.
This method will validate that all registered objects are in a correct state and throw
an error if not, it will contain the full stack of object references in the error message.
If you call this method after each register or change you perform it will pin-point where the error was made.</div>
</li>
</ul>
<a name="writeChanges--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeChanges</h4>
<pre>void&nbsp;writeChanges()</pre>
<div class="block">ADVANCED: Writes all changes now before commit().
The commit process will begin and all changes will be written out to the datastore, but the datastore transaction will not
be committed, nor will changes be merged into the global cache.
<p>
A subsequent commit (on UnitOfWork or global transaction) will be required to finalize the commit process.
<p>
As the commit process has begun any attempt to register objects, or execute object-level queries will
generate an exception. Report queries, non-caching queries, and data read/modify queries are allowed.
<p>
On exception any global transaction will be rolled marked or marked rollback only. No recovery of this UnitOfWork will be possible.
<p>
Can only be called once. It can not be used to write out changes in an incremental fashion.
<p>
Use to partially commit a transaction outside of a JTA transaction's callbacks. Allows you to get back any exception directly.
<p>
Use to commit a UnitOfWork in two stages.</div>
</li>
</ul>
<a name="getReference-java.lang.Class-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReference</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;getReference(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&nbsp;theClass,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;primaryKey)</pre>
<div class="block">Get an instance, whose state may be lazily fetched.
If the requested instance does not exist in the database, null is returned, or the object will fail when accessed.
The instance will be lazy when it does not exist in the cache, and supports fetch groups.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>primaryKey</code> - - The primary key of the object, either as a List, singleton, IdClass or an instance of the object.</dd>
</dl>
</li>
</ul>
<a name="getCommitOrder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCommitOrder</h4>
<pre><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.CommitOrderType.html" title="enum in org.eclipse.persistence.sessions">UnitOfWork.CommitOrderType</a>&nbsp;getCommitOrder()</pre>
<div class="block">ADVANCED:
Return the commit order.</div>
</li>
</ul>
<a name="setCommitOrder-org.eclipse.persistence.sessions.UnitOfWork.CommitOrderType-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setCommitOrder</h4>
<pre>void&nbsp;setCommitOrder(<a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.CommitOrderType.html" title="enum in org.eclipse.persistence.sessions">UnitOfWork.CommitOrderType</a>&nbsp;order)</pre>
<div class="block">ADVANCED:
Set the commit order.</div>
</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="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 class="aboutLanguage">EclipseLink 3.0.2, API Reference</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/eclipse/persistence/sessions/SessionProfilerAdapter.html" title="class in org.eclipse.persistence.sessions"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/eclipse/persistence/sessions/UnitOfWork.CommitOrderType.html" title="enum in org.eclipse.persistence.sessions"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/eclipse/persistence/sessions/UnitOfWork.html" target="_top">Frames</a></li>
<li><a href="UnitOfWork.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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 &#169; 2007&#x2013;2021 <a href="http://www.eclipse.org/eclipselink">Eclipse.org - EclipseLink Project</a>. All rights reserved.</small></p>
</body>
</html>