blob: 660e9e8abafe5902eead8da02828a483e1a123eb [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>
<title>EntityBean</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="EntityBean";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":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>
<div class="subNav">
<ul class="navList">
<li><a href="../../jakarta/ejb/EnterpriseBean.html" title="interface in jakarta.ejb"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../jakarta/ejb/EntityContext.html" title="interface in jakarta.ejb"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?jakarta/ejb/EntityBean.html" target="_top">Frames</a></li>
<li><a href="EntityBean.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>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">jakarta.ejb</div>
<h2 title="Interface EntityBean" class="title">Interface EntityBean</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../jakarta/ejb/EnterpriseBean.html" title="interface in jakarta.ejb">EnterpriseBean</a>, java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">EntityBean</span>
extends <a href="../../jakarta/ejb/EnterpriseBean.html" title="interface in jakarta.ejb">EnterpriseBean</a></pre>
<div class="block">The EntityBean interface is implemented by every entity bean
class. The container uses the EntityBean methods to notify the entity
bean instances of the instance's life cycle events.
<p>
Applications written to the EJB 3.0 and later APIs should use the facilities
of the Jakarta Persistence API (<code>javax.persistence</code>) to model
persistent entities.
<p><b>Note:</b> Support for entity beans is optional as of EJB 3.2.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>EJB 1.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&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="../../jakarta/ejb/EntityBean.html#ejbActivate--">ejbActivate</a></span>()</code>
<div class="block">A container invokes this method when the instance
is taken out of the pool of available instances to become associated
with a specific enterprise bean object.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/ejb/EntityBean.html#ejbLoad--">ejbLoad</a></span>()</code>
<div class="block">A container invokes this method to instruct the
instance to synchronize its state by loading it state from the
underlying database.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/ejb/EntityBean.html#ejbPassivate--">ejbPassivate</a></span>()</code>
<div class="block">A container invokes this method on an instance before the instance
becomes disassociated with a specific enterprise bean 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="../../jakarta/ejb/EntityBean.html#ejbRemove--">ejbRemove</a></span>()</code>
<div class="block">A container invokes this method before it removes the enterprise bean object
that is currently associated with the instance.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/ejb/EntityBean.html#ejbStore--">ejbStore</a></span>()</code>
<div class="block">A container invokes this method to instruct the
instance to synchronize its state by storing it to the underlying
database.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/ejb/EntityBean.html#setEntityContext-jakarta.ejb.EntityContext-">setEntityContext</a></span>(<a href="../../jakarta/ejb/EntityContext.html" title="interface in jakarta.ejb">EntityContext</a>&nbsp;ctx)</code>
<div class="block">Set the associated entity context.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../jakarta/ejb/EntityBean.html#unsetEntityContext--">unsetEntityContext</a></span>()</code>
<div class="block">Unset the associated entity context.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setEntityContext-jakarta.ejb.EntityContext-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEntityContext</h4>
<pre>void&nbsp;setEntityContext(<a href="../../jakarta/ejb/EntityContext.html" title="interface in jakarta.ejb">EntityContext</a>&nbsp;ctx)
throws <a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a>,
java.rmi.RemoteException</pre>
<div class="block">Set the associated entity context. The container invokes this method
on an instance after the instance has been created.
<p> This method is called in an unspecified transaction context.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ctx</code> - An EntityContext interface for the instance. The instance
should store the reference to the context in an instance variable.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a></code> - Thrown by the method to indicate a failure
caused by a system-level error.</dd>
<dd><code>java.rmi.RemoteException</code> - This exception is defined in the method
signature to provide backward compatibility for enterprise beans
written for the enterprise bean 1.0 specification. Enterprise beans written
for the EJB 1.1 specification should throw the
jakarta.ejb.EJBException instead of this exception.
Enterprise beans written for the EJB2.0 and higher specifications
must throw the jakarta.ejb.EJBException instead of this exception.</dd>
</dl>
</li>
</ul>
<a name="unsetEntityContext--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unsetEntityContext</h4>
<pre>void&nbsp;unsetEntityContext()
throws <a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a>,
java.rmi.RemoteException</pre>
<div class="block">Unset the associated entity context. The container calls this method
before removing the instance.
<p> This is the last method that the container invokes on the instance.
The Java garbage collector will eventually invoke the finalize() method
on the instance.
<p> This method is called in an unspecified transaction context.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a></code> - Thrown by the method to indicate a failure
caused by a system-level error.</dd>
<dd><code>java.rmi.RemoteException</code> - This exception is defined in the method
signature to provide backward compatibility for enterprise beans
written for the enterprise bean 1.0 specification. Enterprise beans written
for the EJB 1.1 specification should throw the
jakarta.ejb.EJBException instead of this exception.
Enterprise beans written for the EJB2.0 and higher specifications
must throw the jakarta.ejb.EJBException instead of this exception.</dd>
</dl>
</li>
</ul>
<a name="ejbRemove--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ejbRemove</h4>
<pre>void&nbsp;ejbRemove()
throws <a href="../../jakarta/ejb/RemoveException.html" title="class in jakarta.ejb">RemoveException</a>,
<a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a>,
java.rmi.RemoteException</pre>
<div class="block">A container invokes this method before it removes the enterprise bean object
that is currently associated with the instance. This method
is invoked when a client invokes a remove operation on the
entity bean's home interface or the enterprise bean object's remote interface.
This method transitions the instance from the ready state to the pool
of available instances.
<p> This method is called in the transaction context of the remove
operation.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/ejb/RemoveException.html" title="class in jakarta.ejb">RemoveException</a></code> - The enterprise Bean does not allow
destruction of the object.</dd>
<dd><code><a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a></code> - Thrown by the method to indicate a failure
caused by a system-level error.</dd>
<dd><code>java.rmi.RemoteException</code> - This exception is defined in the method
signature to provide backward compatibility for enterprise beans
written for the enterprise bean 1.0 specification. Enterprise beans written
for the EJB 1.1 specification should throw the
jakarta.ejb.EJBException instead of this exception.
Enterprise beans written for the EJB2.0 and higher specifications
must throw the jakarta.ejb.EJBException instead of this exception.</dd>
</dl>
</li>
</ul>
<a name="ejbActivate--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ejbActivate</h4>
<pre>void&nbsp;ejbActivate()
throws <a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a>,
java.rmi.RemoteException</pre>
<div class="block">A container invokes this method when the instance
is taken out of the pool of available instances to become associated
with a specific enterprise bean object. This method transitions the instance to
the ready state.
<p> This method executes in an unspecified transaction context.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a></code> - Thrown by the method to indicate a failure
caused by a system-level error.</dd>
<dd><code>java.rmi.RemoteException</code> - This exception is defined in the method
signature to provide backward compatibility for enterprise beans
written for the enterprise bean 1.0 specification. Enterprise beans written
for the EJB 1.1 specification should throw the
jakarta.ejb.EJBException instead of this exception.
Enterprise beans written for the EJB2.0 and higher specifications
must throw the jakarta.ejb.EJBException instead of this exception.</dd>
</dl>
</li>
</ul>
<a name="ejbPassivate--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ejbPassivate</h4>
<pre>void&nbsp;ejbPassivate()
throws <a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a>,
java.rmi.RemoteException</pre>
<div class="block">A container invokes this method on an instance before the instance
becomes disassociated with a specific enterprise bean object. After this method
completes, the container will place the instance into the pool of
available instances.
<p> This method executes in an unspecified transaction context.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a></code> - Thrown by the method to indicate a failure
caused by a system-level error.</dd>
<dd><code>java.rmi.RemoteException</code> - This exception is defined in the method
signature to provide backward compatibility for enterprise beans
written for the enterprise bean 1.0 specification. Enterprise beans written
for the EJB 1.1 specification should throw the
jakarta.ejb.EJBException instead of this exception.
Enterprise beans written for the EJB2.0 and higher specifications
must throw the jakarta.ejb.EJBException instead of this exception.</dd>
</dl>
</li>
</ul>
<a name="ejbLoad--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ejbLoad</h4>
<pre>void&nbsp;ejbLoad()
throws <a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a>,
java.rmi.RemoteException</pre>
<div class="block">A container invokes this method to instruct the
instance to synchronize its state by loading it state from the
underlying database.
<p> This method always executes in the transaction context determined
by the value of the transaction attribute in the deployment descriptor.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a></code> - Thrown by the method to indicate a failure
caused by a system-level error.</dd>
<dd><code>java.rmi.RemoteException</code> - This exception is defined in the method
signature to provide backward compatibility for enterprise beans
written for the enterprise bean 1.0 specification. Enterprise beans written
for the EJB 1.1 specification should throw the
jakarta.ejb.EJBException instead of this exception.
Enterprise beans written for the EJB2.0 and higher specifications
must throw the jakarta.ejb.EJBException instead of this exception.</dd>
</dl>
</li>
</ul>
<a name="ejbStore--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ejbStore</h4>
<pre>void&nbsp;ejbStore()
throws <a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a>,
java.rmi.RemoteException</pre>
<div class="block">A container invokes this method to instruct the
instance to synchronize its state by storing it to the underlying
database.
<p> This method always executes in the transaction context determined
by the value of the transaction attribute in the deployment descriptor.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../jakarta/ejb/EJBException.html" title="class in jakarta.ejb">EJBException</a></code> - Thrown by the method to indicate a failure
caused by a system-level error.</dd>
<dd><code>java.rmi.RemoteException</code> - This exception is defined in the method
signature to provide backward compatibility for enterprise beans
written for the enterprise bean 1.0 specification. Enterprise beans written
for the EJB 1.1 specification should throw the
jakarta.ejb.EJBException instead of this exception.
Enterprise beans written for the EJB2.0 and higher specifications
must throw the jakarta.ejb.EJBException instead of this exception.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../jakarta/ejb/EnterpriseBean.html" title="interface in jakarta.ejb"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../jakarta/ejb/EntityContext.html" title="interface in jakarta.ejb"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?jakarta/ejb/EntityBean.html" target="_top">Frames</a></li>
<li><a href="EntityBean.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>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 ======= -->
</body>
</html>