blob: a237d166a9184531c61706cee80d7c048e144d21 [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:11 UTC 2021 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SessionFactory (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="SessionFactory (EclipseLink 3.0.2, API Reference)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/factories/ProjectClassGenerator.html" title="class in org.eclipse.persistence.sessions.factories"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionManager.html" title="class in org.eclipse.persistence.sessions.factories"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/persistence/sessions/factories/SessionFactory.html" target="_top">Frames</a></li>
<li><a href="SessionFactory.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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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.factories</div>
<h2 title="Class SessionFactory" class="title">Class SessionFactory</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.eclipse.persistence.sessions.factories.SessionFactory</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">SessionFactory</span>
extends <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></pre>
<div class="block">Helper class to simplify the development and generation of code that accesses
TopLink through the SessionManager (sessions config XML).
Responsibilities:<ul>
<li> Lookup of a session by name using default or provided sessions config location
<li> Support lookup of active UnitOfWork and Session in JTA environments
<li> Hot/Re-deployment handling of applications
<li> Detachment helpers to simplify usage within a local session bean
</ul>
Basic usage example:
<code>
SessionFactory = sessionFactory = new SessionFactory("session-name");
...
public List read(Vector args) {
Session session = sessionFactory.acquireSession();
List results = (List) session.executeQuery("query-name", MyClass.class, args);
session.release();
return results;
}
public void write(MyClass detachedInstance) {
UnitOfWork uow = sessionFactory.acquireUnitOfWork();
MyClass workingCopy = (MyClass) uow.readObject(detachedInstance);
if (workingCopy == null) {
throw new MyException("Cannot write changes. Object does not exist");
}
uow.deepMergeClone(detachedInstance);
uow.commit();
}
</code>
<b>Detachment</b>: The detach helper methods are provided to assist with the
construction of applications. This helper class was designed for use within
session beans (SB) and in the case of local SBs the objects returned are not
serialized. Since EclipseLink's default behavior is to return the shared instance
from the cache and rely on developers to only modify instances within a
UnitOfWork this may be an issue. The client to the local session bean may
try to modify the instance and thus corrupt the cache. By detaching the object
the client to the session bean gets its own isolated copy that it can freely
modify. This provides the same functionality as with a remote session bean
and allows the developer the choice in how/when objects are detached.
<i>Note</i>: The above code example shows how a detached instance can have
changes made to it persisted through use of the UnitOfWork merge API.</div>
<dl>
<dt><span class="simpleTagLabel">Version:</span></dt>
<dd>10.1.3</dd>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Doug Clarke &amp; John Braken</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Dec 10, 2006</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#SessionFactory-java.lang.String-">SessionFactory</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sessionName)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#SessionFactory-java.lang.String-java.lang.String-">SessionFactory</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sessionsXMLPath,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sessionName)</code>
<div class="block">Constructor for creating a new EclipseLinkSessionHelper instance.</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="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete 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><a href="../../../../../org/eclipse/persistence/sessions/Session.html" title="interface in org.eclipse.persistence.sessions">Session</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#acquireSession--">acquireSession</a></span>()</code>
<div class="block">Returns the Session active for this specified helper.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/persistence/sessions/UnitOfWork.html" title="interface in org.eclipse.persistence.sessions">UnitOfWork</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#acquireUnitOfWork--">acquireUnitOfWork</a></span>()</code>
<div class="block">Looks up the active UnitOfWork using either the global JTA TX or acquires
a new one from the active session.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/persistence/sessions/UnitOfWork.html" title="interface in org.eclipse.persistence.sessions">UnitOfWork</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#acquireUnitOfWork-org.eclipse.persistence.sessions.Session-">acquireUnitOfWork</a></span>(<a href="../../../../../org/eclipse/persistence/sessions/Session.html" title="interface in org.eclipse.persistence.sessions">Session</a>&nbsp;session)</code>
<div class="block">Looks up the active UnitOfWork using either the global JTA TX or acquires
a new one from the active session.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#detach-java.util.Collection-">detach</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;entities)</code>&nbsp;</td>
</tr>
<tr id="i4" 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/factories/SessionFactory.html#detach-java.lang.Object-">detach</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;entity)</code>
<div class="block">Build a detached copy using a one-off UnitOfWork.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#getClassLoader--">getClassLoader</a></span>()</code>
<div class="block">The class-loader returned form this call will be used when loading the
EclipseLink configuration.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#getSessionName--">getSessionName</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#getSessionXMLPath--">getSessionXMLPath</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/persistence/sessions/DatabaseSession.html" title="interface in org.eclipse.persistence.sessions">DatabaseSession</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#getSharedSession--">getSharedSession</a></span>()</code>
<div class="block">Helper method that looks up the singleton session and ensure that
if the application has been hot-deployed it gets a fresh version of the
server.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/eclipse/persistence/sessions/DatabaseSession.html" title="interface in org.eclipse.persistence.sessions">DatabaseSession</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionFactory.html#getSharedSession-boolean-boolean-">getSharedSession</a></span>(boolean&nbsp;login,
boolean&nbsp;refresh)</code>
<div class="block">Used in place of getSharedSession() when the calling application needs
access to the session prior to login or it wishes to force the session
configuration to be re-loaded an applied.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<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></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="SessionFactory-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SessionFactory</h4>
<pre>public&nbsp;SessionFactory(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sessionsXMLPath,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sessionName)</pre>
<div class="block">Constructor for creating a new EclipseLinkSessionHelper instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sessionsXMLPath</code> - - resource path of the sessions configuration xml.</dd>
<dd><code>sessionName</code> - - name of the session to use.</dd>
</dl>
</li>
</ul>
<a name="SessionFactory-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SessionFactory</h4>
<pre>public&nbsp;SessionFactory(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;sessionName)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getSessionName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSessionName</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getSessionName()</pre>
</li>
</ul>
<a name="getSessionXMLPath--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSessionXMLPath</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getSessionXMLPath()</pre>
</li>
</ul>
<a name="getClassLoader--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoader</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;getClassLoader()</pre>
<div class="block">The class-loader returned form this call will be used when loading the
EclipseLink configuration. By default this is the current thread's loader.
If this is not the case users can subclass this session factory and
override this method to provide a different loader.</div>
</li>
</ul>
<a name="getSharedSession--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSharedSession</h4>
<pre>public&nbsp;<a href="../../../../../org/eclipse/persistence/sessions/DatabaseSession.html" title="interface in org.eclipse.persistence.sessions">DatabaseSession</a>&nbsp;getSharedSession()</pre>
<div class="block">Helper method that looks up the singleton session and ensure that
if the application has been hot-deployed it gets a fresh version of the
server.</div>
</li>
</ul>
<a name="getSharedSession-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSharedSession</h4>
<pre>public&nbsp;<a href="../../../../../org/eclipse/persistence/sessions/DatabaseSession.html" title="interface in org.eclipse.persistence.sessions">DatabaseSession</a>&nbsp;getSharedSession(boolean&nbsp;login,
boolean&nbsp;refresh)</pre>
<div class="block">Used in place of getSharedSession() when the calling application needs
access to the session prior to login or it wishes to force the session
configuration to be re-loaded an applied. This also makes use of the
current class-loader return from getClassLoader() and a SessionManager
class-loader check to see if the application was loaded by another
class-loader and is should this be refreshed as the application has been
hot deployed.</div>
</li>
</ul>
<a name="acquireSession--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acquireSession</h4>
<pre>public&nbsp;<a href="../../../../../org/eclipse/persistence/sessions/Session.html" title="interface in org.eclipse.persistence.sessions">Session</a>&nbsp;acquireSession()</pre>
<div class="block">Returns the Session active for this specified helper. If the EclipseLink
session does not have an external transaction controller or there is
not an active JTA transaction then a newly acquire client session is
returned on each call.
This method also properly handles acquire a client session from a broker
as well as returning the shared session in the case it is a database
session.</div>
</li>
</ul>
<a name="acquireUnitOfWork--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acquireUnitOfWork</h4>
<pre>public&nbsp;<a href="../../../../../org/eclipse/persistence/sessions/UnitOfWork.html" title="interface in org.eclipse.persistence.sessions">UnitOfWork</a>&nbsp;acquireUnitOfWork()</pre>
<div class="block">Looks up the active UnitOfWork using either the global JTA TX or acquires
a new one from the active session.</div>
</li>
</ul>
<a name="acquireUnitOfWork-org.eclipse.persistence.sessions.Session-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acquireUnitOfWork</h4>
<pre>public&nbsp;<a href="../../../../../org/eclipse/persistence/sessions/UnitOfWork.html" title="interface in org.eclipse.persistence.sessions">UnitOfWork</a>&nbsp;acquireUnitOfWork(<a href="../../../../../org/eclipse/persistence/sessions/Session.html" title="interface in org.eclipse.persistence.sessions">Session</a>&nbsp;session)</pre>
<div class="block">Looks up the active UnitOfWork using either the global JTA TX or acquires
a new one from the active session. THis method should be used if a session
has already been acquired.</div>
</li>
</ul>
<a name="detach-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>detach</h4>
<pre>public&nbsp;<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;detach(<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;entity)</pre>
<div class="block">Build a detached copy using a one-off UnitOfWork.
This simulates creation of a copy through serialization when using a
remote session bean if this copy process is not done the user of this
helper would return the shared copy from the cache that should not be
modified. These detachment methods *MUST* be used for local session
beans where the returned objects can be modified by the client.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>entity</code> - an existing persistent entity</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a copy of the entity for use in a local client that may make changes to it</dd>
</dl>
</li>
</ul>
<a name="detach-java.util.Collection-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>detach</h4>
<pre>public&nbsp;<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;detach(<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;entities)</pre>
</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/factories/ProjectClassGenerator.html" title="class in org.eclipse.persistence.sessions.factories"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/eclipse/persistence/sessions/factories/SessionManager.html" title="class in org.eclipse.persistence.sessions.factories"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/persistence/sessions/factories/SessionFactory.html" target="_top">Frames</a></li>
<li><a href="SessionFactory.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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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>